From 7b517f2fa6026605f7941e990b61ed8091f7505c Mon Sep 17 00:00:00 2001 From: chrin Date: Thu, 8 Feb 2024 14:23:15 +0100 Subject: [PATCH] changes from Nov. 2023 --- .gitignore | 5 +- INSTALL | 318 +- autogen_sfbd.sh | 49 +- autogen_sfbd_RHEL7.sh | 321 + config.guess | 854 +- config.log | 928 +- config.status | 235 +- config.sub | 409 +- configurePSI.ac | 6 +- examples/cafeTest/#makfile7# | 3 - include/config.h | 32 +- include/connect.h | 8 +- include/global.h | 1 + include/instant.h | 3 +- include/makefile | 83 +- libtool | 57 +- m4/libtool.m4 | 5 +- makefile | 123 +- src/PyCafe37.cpp | 168553 ++++++++++++++++++++ src/bitshuffle/.deps/bitshuffle.Plo | 113 +- src/bitshuffle/.deps/bitshuffle_core.Plo | 118 +- src/bitshuffle/.deps/iochain.Plo | 76 +- src/cafe.cpp | 17 +- src/connect.cpp | 18 +- src/makefile | 232 +- src/makefile.am | 4 +- 26 files changed, 170818 insertions(+), 1753 deletions(-) create mode 100644 autogen_sfbd_RHEL7.sh delete mode 100644 examples/cafeTest/#makfile7# create mode 100644 src/PyCafe37.cpp diff --git a/.gitignore b/.gitignore index e267adf..ad96580 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ # Temporary (build) files # ########################### *.bak +*.*-* +*.*+* aclocal.m4 autom4te.cache config.in @@ -32,7 +34,8 @@ src/*.o src/*.lo src/*.la src/.deps/* +src/bitshuffle/.deps/* src/.libs/* examples/cafeTest/*.*- doc - +compile diff --git a/INSTALL b/INSTALL index 007e939..8865734 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, -Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software +Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -12,97 +12,96 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for + Briefly, the shell command './configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented +'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. - The `configure' shell script attempts to guess correct values for + The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that +those values to create a 'Makefile' in each directory of the package. +It may also create one or more '.h' files containing system-dependent +definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). +file 'config.log' containing compiler output (useful mainly for +debugging 'configure'). - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. + It can also use an optional file (typically called 'config.cache' and +enabled with '--cache-file=config.cache' or simply '-C') that saves the +results of its tests to speed up reconfiguring. Caching is disabled by +default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can +to figure out how 'configure' could check whether to do them, and mail +diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you +some point 'config.cache' contains results you don't want to keep, you may remove or edit it. - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. + The file 'configure.ac' (or 'configure.in') is used to create +'configure' by a program called 'autoconf'. You need 'configure.ac' if +you want to change it or regenerate 'configure' using a newer version of +'autoconf'. The simplest way to compile this package is: - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. + 1. 'cd' to the directory containing the package's source code and type + './configure' to configure the package for your system. - Running `configure' might take a while. While running, it prints + Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. - 2. Type `make' to compile the package. + 2. Type 'make' to compile the package. - 3. Optionally, type `make check' to run any self-tests that come with + 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. - 4. Type `make install' to install the programs and any data files and + 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root + user, and only the 'make install' phase executed with root privileges. - 5. Optionally, type `make installcheck' to repeat any self-tests, but + 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required + regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly + source code directory by typing 'make clean'. To also remove the + files that 'configure' created (so you can compile the package for + a different kind of computer), type 'make distclean'. There is + also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. - 7. Often, you can also type `make uninstall' to remove the installed + 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. - 8. Some packages, particularly those that use Automake, provide `make + 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. + targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' +the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: + You can give 'configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here is +an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix @@ -113,21 +112,21 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the +own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. +the 'configure' script. 'configure' automatically checks for the source +code in the directory that 'configure' is in and in '..'. This is known +as a "VPATH" build. - With a non-GNU `make', it is safer to compile the package for one + With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before +installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like +"universal" binaries--by specifying multiple '-arch' options to the +compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ @@ -136,105 +135,104 @@ this: This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. +using the 'lipo' tool if you have problems. Installation Names ================== - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an + By default, 'make install' installs the package's commands under +'/usr/local/bin', include files under '/usr/local/include', etc. You +can specify an installation prefix other than '/usr/local' by giving +'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses +pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory +options like '--bindir=DIR' to specify different values for particular +kinds of files. Run 'configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the default +for these options is expressed in terms of '${prefix}', so that +specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or +correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without +'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each -affected directory. For example, `make install +affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. +'${prefix}'. Any directories that were specified during 'configure', +but not in terms of '${prefix}', must each be overridden at install time +for the entire installation to be relocated. The approach of makefile +variable overrides for each directory variable is required by the GNU +Coding Standards, and ideally causes no recompilation. However, some +platforms have known limitations with the semantics of shared libraries +that end up requiring recompilation when using this method, particularly +noticeable in packages that use GNU Libtool. - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and + The second method involves providing the 'DESTDIR' variable. For +example, 'make install DESTDIR=/alternate/directory' will prepend +'/alternate/directory' before all installation names. The approach of +'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. +when some directory options were not specified in terms of '${prefix}' +at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. +with an extra prefix or suffix on their names by giving 'configure' the +option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the + Some packages pay attention to '--enable-FEATURE' options to +'configure', where FEATURE indicates an optional part of the package. +They may also pay attention to '--with-PACKAGE' options, where PACKAGE +is something like 'gnu-as' or 'x' (for the X Window System). The +'README' should mention any '--enable-' and '--with-' options that the package recognizes. - For packages that use the X Window System, `configure' can usually + For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. +you can use the 'configure' options '--x-includes=DIR' and +'--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure +execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure +overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. +overridden with 'make V=0'. Particular systems ================== - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in + On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC +is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. + HP-UX 'make' updates targets which have the same time stamps as their +prerequisites, which makes it generally unusable when shipped generated +files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try +parse its '' header file. The option '-nodtk' can be used as a +workaround. If GNU CC is not installed, it is therefore recommended to +try ./configure CC="cc" @@ -242,26 +240,26 @@ and if that doesn't work, try ./configure CC="cc -nodtk" - On Solaris, don't put `/usr/ucb' early in your `PATH'. This + On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. +these programs are available in '/usr/bin'. So, if you need '/usr/ucb' +in your 'PATH', put it _after_ '/usr/bin'. - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: + On Haiku, software installed for all users goes in '/boot/common', +not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== - There may be some features `configure' cannot figure out + There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints +_same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: +'--build=TYPE' option. TYPE can either be a short name for the system +type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM @@ -270,101 +268,101 @@ where SYSTEM can have one of these forms: OS KERNEL-OS - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't + See the file 'config.sub' for the possible values of each field. If +'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will +use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. +eventually be run) with '--host=TYPE'. Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. + If you want to set default values for 'configure' scripts to share, +you can create a site shell script called 'config.site' that gives +default values for variables like 'CC', 'cache_file', and 'prefix'. +'configure' looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run +environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: +them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -causes the specified `gcc' to be used as the C compiler (unless it is +causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf limitation. Until the limitation is lifted, you can use -this workaround: +Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an +Autoconf limitation. Until the limitation is lifted, you can use this +workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash -`configure' Invocation +'configure' Invocation ====================== - `configure' recognizes the following options to control how it + 'configure' recognizes the following options to control how it operates. -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. +'--help' +'-h' + Print a summary of all of the options to 'configure', and exit. -`--help=short' -`--help=recursive' +'--help=short' +'--help=recursive' Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. + 'configure', and exit. The 'short' variant lists options used only + in the top level, while the 'recursive' variant lists options also + present in any nested packages. -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' +'--version' +'-V' + Print the version of Autoconf used to generate the 'configure' script, and exit. -`--cache-file=FILE' +'--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to + traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. +'--config-cache' +'-C' + Alias for '--cache-file=config.cache'. -`--quiet' -`--silent' -`-q' +'--quiet' +'--silent' +'-q' Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error + suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). -`--srcdir=DIR' +'--srcdir=DIR' Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. + 'configure' can determine that directory automatically. -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. +'--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: for + more details, including other options available for fine-tuning the + installation locations. -`--no-create' -`-n' +'--no-create' +'-n' Run the configure checks, but stop before creating any output files. -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. +'configure' also accepts some other, not widely useful, options. Run +'configure --help' for more details. diff --git a/autogen_sfbd.sh b/autogen_sfbd.sh index e538692..f9d91dc 100644 --- a/autogen_sfbd.sh +++ b/autogen_sfbd.sh @@ -3,7 +3,8 @@ # default is sf # module unload gcc -module load gcc/7.3.0 #7.5.0 for py38 7.3.0 py37 +module load gcc/7.5.0 #7.5.0 for py38 py310 7.3.0 py37 +#module load gcc/8.5.0 #rhel8 ### psi specific - end rm -f configure.ac @@ -12,7 +13,7 @@ ln -s configurePSI.ac configure.ac rm -f ./aclocal.m4 rm -rf ./autom4te.cache aclocal --force -I m4 -/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6 +libtoolize --force --copy #select libtools 2.4.6 #libtoolize --force --copy autoconf --force #interprets configure.ac autoheader --force @@ -23,7 +24,9 @@ automake --force --add-missing --copy #Used by ./configure #Assumes format ${EPICS}/base-3.14.12 #source cafeVersion-gcc-7.3.0 -CAFE_V="cafe-1.19.1" +CAFE_V="cafe-1.19.3" +EPICS_BASE='base-7.0.7' # + #For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH #Assume Linux but check if Darwin CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin") @@ -32,13 +35,16 @@ export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN RETURN_ON_WRONG_INPUT=true RETURN_FLAG=false -EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base) +##EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base) + +_EPICS_HOST_ARCH=${RHREL}-x86_64 + #EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base) echo $EPICS_BASE -if [ -z "$EPICS_BASE_VERSION" ] -then - EPICS_BASE='base-7.0.6' #7.0 = 7+0 = 7 for major release -fi +#if [ -z "$EPICS_BASE_VERSION" ] +#then +# EPICS_BASE='base-7.0.7' #7.0 = 7+0 = 7 for major release +#fi echo 'input' "$0" "$1" "$2" echo $EPICS_BASE @@ -57,7 +63,8 @@ echo 'input arg. facility/target' $FACILITY $CACLIENT if [ -n "$FACILITY" ] then if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \ - [ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py38" ] || \ + [ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py39" ] || \ + [ "$FACILITY" = "py38" ] || \ [ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \ [ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \ [ "$FACILITY" = "cc" ] || [ "$FACILITY" = "py34" ] @@ -126,7 +133,8 @@ fi if [ -n "$CACLIENT" ] then if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \ - [ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py38" ] || \ + [ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py39" ] || \ + [ "$CACLIENT" = "py38" ] || \ [ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \ [ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \ [ "$CACLIENT" = "cc" ] || [ "$CACLIENT" = "py34" ] @@ -136,7 +144,8 @@ then if [ -n "$CACLIENT_TEMP" ] then if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \ - [ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py38" ] || \ + [ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py39" ] || \ + [ "$CACLIENT_TEMP" = "py38" ] || \ [ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \ [ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \ [ "$CACLIENT_TEMP" = "cc" ] || [ "$CACLIENT_TEMP" = "py34" ] @@ -191,7 +200,7 @@ then ENABLE_OPTIONS+=" --enable-epics7" #CAFE_V+="-sls2" else - ENABLE_OPTIONS+=" --enable-epics3" + ENABLE_OPTIONS+=" --enable-epics7" if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ] then CAFE_V+="-sf" @@ -223,12 +232,18 @@ then ENABLE_OPTIONS+=" --enable-python38" ENABLE_OPTIONS+=" --enable-qt5py38" CAFE_V+="-py38" +elif [ "$CACLIENT" = "py39" ] +then + ENABLE_OPTIONS+=" --enable-python39" + ENABLE_OPTIONS+=" --enable-qt5py39" + CAFE_V+="-py39" elif [ "$CACLIENT" = "py310" ] then ENABLE_OPTIONS+=" --enable-python310" #ENABLE_OPTIONS+=" --enable-qt5py310" CAFE_V+="-py310" -else +elif [ "$CACLIENT" = "cpp" ] +then ENABLE_OPTIONS+=" --enable-qt5" fi @@ -280,16 +295,16 @@ echo 'ENABLE_OPTIONS============> '$ENABLE_OPTIONS ./configure \ --prefix=/opt/gfa/cafe/cpp/${CAFE_V} \ - --libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \ + --libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${_EPICS_HOST_ARCH} \ ${ENABLE_OPTIONS} \ --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ --with-epics3=${EPICS}/base \ - --with-python310=/ioc/python/latest \ + --with-python310=/opt/gfa/python-3.10/latest \ --with-python38=/opt/gfa/python-3.8/latest \ --with-python37=/opt/gfa/python-3.7/latest \ --with-python35=/opt/gfa/python-3.5/latest \ --with-python34=/opt/psi/Programming/psi-python34/2.1.0 \ - --with-qt5py310=/ioc/python/latest \ + --with-qt5py310=/opt/gfa/python-3.10/latest \ --with-qt5py38=/opt/gfa/python-3.8/latest \ --with-qt5=/opt/gfa/python-3.7/latest \ --with-qt4=/opt/gfa/python-3.5/latest \ @@ -298,7 +313,7 @@ echo 'ENABLE_OPTIONS============> '$ENABLE_OPTIONS --with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 \ --with-curl=/sf/bd/deps/zmq/curl-7.55.1 \ --with-lz4=/sf/bd/deps/zmq/lz4/lib \ - --with-epics7=/usr/local/epics/base-7.0.6 + --with-epics7=/usr/local/epics/${EPICS_BASE} unset CAFE_EPICS_V_PATCH unset CAFE_EPICS_V_MINOR unset CAFE_EPICS_V_MAJOR diff --git a/autogen_sfbd_RHEL7.sh b/autogen_sfbd_RHEL7.sh new file mode 100644 index 0000000..fd346e5 --- /dev/null +++ b/autogen_sfbd_RHEL7.sh @@ -0,0 +1,321 @@ +### psi specific - select compiler +#source +# default is sf +# +module unload gcc +module load gcc/7.5.0 #7.5.0 for py38 AND PY310 7.3.0 py37 +#module load gcc/8.5.0 #rhel8 +### psi specific - end + +rm -f configure.ac +ln -s configurePSI.ac configure.ac + +rm -f ./aclocal.m4 +rm -rf ./autom4te.cache +aclocal --force -I m4 +/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6 +#libtoolize --force --copy +autoconf --force #interprets configure.ac +autoheader --force +automake --force --add-missing --copy +#autoreconf not wanted + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 +#source cafeVersion-gcc-7.3.0 +CAFE_V="cafe-1.19.3" +EPICS_BASE='base-7.0.7' +#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH +#Assume Linux but check if Darwin +CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin") +export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN + +RETURN_ON_WRONG_INPUT=true +RETURN_FLAG=false + +###EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base) + +_EPICS_HOST_ARCH=${RHREL}-x86_64 + +#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base) +echo $EPICS_BASE +#if [ -z "$EPICS_BASE_VERSION" ] +#then +# EPICS_BASE='base-7.0.7' #7.0 = 7+0 = 7 for major release +#fi + +echo 'input' "$0" "$1" "$2" +echo $EPICS_BASE + +FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]') +CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]') + +FACILITY_DEFAULT="sls2" +CACLIENT_DEFAULT="py37" + +FACILITY_TEMP="" +CACLIENT_TEMP="" + +echo 'input arg. facility/target' $FACILITY $CACLIENT + +if [ -n "$FACILITY" ] +then + if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \ + [ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py39" ] || \ + [ "$FACILITY" = "py38" ] || \ + [ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \ + [ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \ + [ "$FACILITY" = "cc" ] || [ "$FACILITY" = "py34" ] + then + CACLIENT_TEMP=$FACILITY + FACILITY_TEMP=$2 + fi +fi + +if [ -n "$CACLIENT" ] +then + if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \ + [ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \ + [ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ] + then + if [ -z $FACILITY_TEMP ] + then + FACILITY_TEMP=$CACLIENT + CACLIENT_TEMP=$1 + fi + fi +fi + + + +if [ -z "$FACILITY" ] +then + FACILITY="sf" + echo "FACILITY = " $FACILITY + if [ -z $CACLIENT ] + then + CACLIENT=$CACLIENT_DEFAULT + fi +elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \ + [ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \ + [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ] +then + echo "FACILITY = " $FACILITY +elif [ -n "$FACILITY_TEMP" ] +then + if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \ + [ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \ + [ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ] + then + + + FACILITY=$FACILITY_TEMP + else + if [ -n "$2" ] + then + echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY + echo "***VALID VALUES ARE: sls sls2 sf hipa" + RETURN_FLAG=true + fi + echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT + FACILITY=$FACILITY_DEFAULT + fi +else + echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY + echo "***VALID VALUES ARE: sls sls2 sf hipa" + RETURN_FLAG=true + echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT + FACILITY=$FACILITY_DEFAULT +fi + +if [ -n "$CACLIENT" ] +then + if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \ + [ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py39" ] || \ + [ "$CACLIENT" = "py38" ] || \ + [ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \ + [ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \ + [ "$CACLIENT" = "cc" ] || [ "$CACLIENT" = "py34" ] + then + echo "CA TARGET = " $CACLIENT + else + if [ -n "$CACLIENT_TEMP" ] + then + if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \ + [ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py39" ] || \ + [ "$CACLIENT_TEMP" = "py38" ] || \ + [ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \ + [ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \ + [ "$CACLIENT_TEMP" = "cc" ] || [ "$CACLIENT_TEMP" = "py34" ] + then + CACLIENT=$CACLIENT_TEMP + else + echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT + echo "***VALID VALUES ARE: cpp matlab python" + RETURN_FLAG=true + echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT + CACLIENT=$CACLIENT_DEFAULT + fi + else + echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT + echo "***VALID VALUES ARE: cpp matlab python" + RETURN_FLAG=true + echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT + CACLIENT=$CACLIENT_DEFAULT + fi + fi +else + CACLIENT=$CACLIENT_DEFAULT +fi + + + +if [ $RETURN_ON_WRONG_INPUT = true ] ; then + if [ $RETURN_FLAG = true ] ; then + return 1 2>/dev/null + exit 1 + fi +fi + +echo "FACILITY SELECTED = " $FACILITY +echo "CA TARGET SELECTED = " $CACLIENT + +ENABLE_OPTIONS="--enable-boost-inc" + +if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ] +then + FACILITY="sf" +fi + +if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ] +then + CACLIENT="py37" +fi + + +if [ "$FACILITY" = "sls2" ] +then + ENABLE_OPTIONS+=" --enable-epics7" + #CAFE_V+="-sls2" +else + ENABLE_OPTIONS+=" --enable-epics7" + if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ] + then + CAFE_V+="-sf" + elif [ "$FACILITY" = "sls" ] && [ "$CACLIENT" != "matlab" ] + then + CAFE_V+="-epics3" + fi + +fi + + +if [ "$CACLIENT" = "py34" ] +then + ENABLE_OPTIONS+=" --enable-python34" + ENABLE_OPTIONS+=" --enable-qt4py34" + CAFE_V+="-py34" +elif [ "$CACLIENT" = "py35" ] +then + ENABLE_OPTIONS+=" --enable-python35" + ENABLE_OPTIONS+=" --enable-qt4" + CAFE_V+="-py35" +elif [ "$CACLIENT" = "py37" ] +then + ENABLE_OPTIONS+=" --enable-python37" + ENABLE_OPTIONS+=" --enable-qt5" + CAFE_V+="-py37" +elif [ "$CACLIENT" = "py38" ] +then + ENABLE_OPTIONS+=" --enable-python38" + ENABLE_OPTIONS+=" --enable-qt5py38" + CAFE_V+="-py38" +elif [ "$CACLIENT" = "py39" ] +then + ENABLE_OPTIONS+=" --enable-python39" + ENABLE_OPTIONS+=" --enable-qt5py39" + CAFE_V+="-py39" +elif [ "$CACLIENT" = "py310" ] +then + ENABLE_OPTIONS+=" --enable-python310" + #ENABLE_OPTIONS+=" --enable-qt5py310" + CAFE_V+="-py310" +elif [ "$CACLIENT" = "cpp" ] +then + ENABLE_OPTIONS+=" --enable-qt5" +fi + +if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ] +then + #rm -f src/PyCafe.cpp + #ln -s PyCafe3.cpp src/PyCafe.cpp + ENABLE_OPTIONS+=" --enable-json" + ENABLE_OPTIONS+=" --enable-zeromq" + ENABLE_OPTIONS+=" --enable-curl" + ENABLE_OPTIONS+=" --enable-lz4" +#else + #rm -f src/PyCafe.cpp + #ln -s PyCafe_sls.cpp src/PyCafe.cpp +fi + +CAFE_V+="-gcc-"$GCC_VERSION + +echo "$CAFE_V" + +echo 'EPICS BASE IS='$EPICS_BASE +#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1 + +EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT +#echo $EBMIN1 + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#ENABLE_OPTIONS+=" --enable-qt5" +##ENABLE_OPTIONS+=" --enable-qt4" +#ENABLE_OPTIONS+=" --enable-python37" +##ENABLE_OPTIONS+=" --enable-python35" +#ENABLE_OPTIONS+=" --enable-json" +#ENABLE_OPTIONS+=" --enable-zeromq" +#ENABLE_OPTIONS+=" --enable-curl" +#ENABLE_OPTIONS+=" --enable-lz4" + +echo 'ENABLE_OPTIONS============> '$ENABLE_OPTIONS + + +./configure \ + --prefix=/opt/gfa/cafe/cpp/${CAFE_V} \ + --libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${_EPICS_HOST_ARCH} \ + ${ENABLE_OPTIONS} \ + --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --with-epics3=${EPICS}/base \ + --with-python310=/opt/gfa/python-3.10/latest \ + --with-python38=/opt/gfa/python-3.8/latest \ + --with-python37=/opt/gfa/python-3.7/latest \ + --with-python35=/opt/gfa/python-3.5/latest \ + --with-python34=/opt/psi/Programming/psi-python34/2.1.0 \ + --with-qt5py310=/opt/gfa/python-3.10/latest \ + --with-qt5py38=/opt/gfa/python-3.8/latest \ + --with-qt5=/opt/gfa/python-3.7/latest \ + --with-qt4=/opt/gfa/python-3.5/latest \ + --with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 \ + --with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 \ + --with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 \ + --with-curl=/sf/bd/deps/zmq/curl-7.55.1 \ + --with-lz4=/sf/bd/deps/zmq/lz4/lib \ + --with-epics7=/usr/local/epics/${EPICS_BASE} +unset CAFE_EPICS_V_PATCH +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_MAJOR + +unset CAFE_HOST_FLAG_DARWIN + diff --git a/config.guess b/config.guess index b79252d..256083a 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2018-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2013-06-10' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,12 +24,12 @@ timestamp='2013-06-10' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -168,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -197,44 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -319,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -346,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + eval "$set_cc_for_build" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -386,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -415,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -461,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -503,17 +534,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -530,7 +561,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -542,14 +573,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -560,7 +591,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -574,26 +605,27 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -608,28 +640,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -662,13 +694,13 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -679,23 +711,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -720,11 +752,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -733,7 +765,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -741,9 +773,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -768,127 +800,109 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -901,58 +915,64 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -966,64 +986,70 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1037,34 +1063,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1074,12 +1100,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1089,9 +1115,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1099,7 +1125,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1111,9 +1137,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1133,9 +1159,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1144,28 +1170,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1176,7 +1202,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1196,23 +1222,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1231,67 +1257,93 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1300,18 +1352,18 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1332,14 +1384,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1348,182 +1400,48 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif +echo "$0: unable to guess system type" >&2 -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 </dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi + ;; +esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1542,16 +1460,16 @@ hostinfo = `(hostinfo) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/config.log b/config.log index b552c5e..64ebd16 100644 --- a/config.log +++ b/config.log @@ -1,20 +1,20 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by CAFE configure 1.19.1, which was +It was created by CAFE configure 1.19.3, which was generated by GNU Autoconf 2.69. Invocation command line was - $ ./configure --prefix=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0 --libdir=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64 --enable-boost-inc --enable-epics7 --enable-qt5 --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include --with-epics3=/usr/local/epics/base --with-python310=/ioc/python/latest --with-python38=/opt/gfa/python-3.8/latest --with-python37=/opt/gfa/python-3.7/latest --with-python35=/opt/gfa/python-3.5/latest --with-python34=/opt/psi/Programming/psi-python34/2.1.0 --with-qt5py310=/ioc/python/latest --with-qt5py38=/opt/gfa/python-3.8/latest --with-qt5=/opt/gfa/python-3.7/latest --with-qt4=/opt/gfa/python-3.5/latest --with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 --with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 --with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 --with-curl=/sf/bd/deps/zmq/curl-7.55.1 --with-lz4=/sf/bd/deps/zmq/lz4/lib --with-epics7=/usr/local/epics/base-7.0.6 CXX=/opt/psi/Programming/gcc/7.3.0/bin/g++ CC=/opt/psi/Programming/gcc/7.3.0/bin/gcc --no-create --no-recursion + $ ./configure --prefix=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0 --libdir=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64 --enable-boost-inc --enable-epics7 --enable-python310 --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include --with-epics3=/usr/local/epics/base --with-python310=/opt/gfa/python-3.10/latest --with-python38=/opt/gfa/python-3.8/latest --with-python37=/opt/gfa/python-3.7/latest --with-python35=/opt/gfa/python-3.5/latest --with-python34=/opt/psi/Programming/psi-python34/2.1.0 --with-qt5py310=/opt/gfa/python-3.10/latest --with-qt5py38=/opt/gfa/python-3.8/latest --with-qt5=/opt/gfa/python-3.7/latest --with-qt4=/opt/gfa/python-3.5/latest --with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 --with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 --with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 --with-curl=/sf/bd/deps/zmq/curl-7.55.1 --with-lz4=/sf/bd/deps/zmq/lz4/lib --with-epics7=/usr/local/epics/base-7.0.7 ## --------- ## ## Platform. ## ## --------- ## -hostname = gfa-lc7.psi.ch +hostname = sf-lc8.psi.ch uname -m = x86_64 -uname -r = 3.10.0-1160.80.1.el7.x86_64 +uname -r = 4.18.0-477.15.1.el8_8.x86_64 uname -s = Linux -uname -v = #1 SMP Sat Oct 8 18:13:21 UTC 2022 +uname -v = #1 SMP Fri Jun 2 08:27:19 EDT 2023 /usr/bin/uname -p = x86_64 /bin/uname -X = unknown @@ -27,22 +27,20 @@ uname -v = #1 SMP Sat Oct 8 18:13:21 UTC 2022 /usr/bin/oslevel = unknown /bin/universe = unknown -PATH: /opt/psi/Programming/gcc/7.3.0/bin -PATH: /usr/local/epics/seq/bin/RHEL7-x86_64 +PATH: /opt/psi/Programming/gcc/7.5.0/bin +PATH: /usr/local/epics/seq/bin/RHEL8-x86_64 PATH: . PATH: /usr/lib/openoffice.org/program PATH: /opt/psi/Tools/HDFView/3.1.2/bin PATH: /opt/psi/Programming/matlab/2018a/bin +PATH: /usr/share/Modules/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /usr/local/sbin PATH: /usr/sbin -PATH: /work/bd/bin -PATH: /sls/bd/bin -PATH: /sls/controls/bin -PATH: /work/sls/bin -PATH: /work/bin -PATH: /opt/psi/Tools/Pmodules/1.0.0rc4/bin +PATH: /sf/controls/bin +PATH: /sf/diag/bin +PATH: /sf/bd/bin PATH: /opt/puppetlabs/bin PATH: /afs/psi.ch/project/zeromq/deps/pycharm-community-2018.1.4/bin PATH: /afs/psi.ch/user/c/chrin/Downloads/astyle/build/gcc/bin @@ -68,344 +66,353 @@ configure:2872: checking whether make sets $(MAKE) configure:2894: result: yes configure:2923: checking whether make supports nested variables configure:2940: result: yes -configure:3147: checking for C++ compiler version -configure:3156: /opt/psi/Programming/gcc/7.3.0/bin/g++ --version >&5 -g++ ('PSI Environment Module') 7.3.0 +configure:3189: checking for C++ compiler version +configure:3198: /opt/psi/Programming/gcc/7.5.0/bin/g++ --version >&5 +g++ ('PSI Environment Module') 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -configure:3167: $? = 0 -configure:3156: /opt/psi/Programming/gcc/7.3.0/bin/g++ -v >&5 +configure:3209: $? = 0 +configure:3198: /opt/psi/Programming/gcc/7.5.0/bin/g++ -v >&5 Using built-in specs. -COLLECT_GCC=/opt/psi/Programming/gcc/7.3.0/bin/g++ -COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper +COLLECT_GCC=/opt/psi/Programming/gcc/7.5.0/bin/g++ +COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.5.0/lto-wrapper Target: x86_64-pc-linux-gnu -Configured with: /opt/tmp/stadler_h/src/gcc-7.3.0/configure --prefix=/opt/psi/Programming/gcc/7.3.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran --with-gmp=/opt/psi/Libraries/gmp/6.1.2 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.0 --with-mpc=/opt/psi/Libraries/mpc/1.1.0 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug +Configured with: /var/tmp/gsell/gcc-7.5.0/src/configure --prefix=/opt/psi/Programming/gcc/7.5.0 --with-gmp=/opt/psi/Libraries/gmp/6.2.0 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.2-1 --with-mpc=/opt/psi/Libraries/mpc/1.1.0-4 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug Thread model: posix -gcc version 7.3.0 ('PSI Environment Module') -configure:3167: $? = 0 -configure:3156: /opt/psi/Programming/gcc/7.3.0/bin/g++ -V >&5 +gcc version 7.5.0 ('PSI Environment Module') +configure:3209: $? = 0 +configure:3198: /opt/psi/Programming/gcc/7.5.0/bin/g++ -V >&5 g++: error: unrecognized command line option '-V' g++: fatal error: no input files compilation terminated. -configure:3167: $? = 1 -configure:3156: /opt/psi/Programming/gcc/7.3.0/bin/g++ -qversion >&5 +configure:3209: $? = 1 +configure:3198: /opt/psi/Programming/gcc/7.5.0/bin/g++ -qversion >&5 g++: error: unrecognized command line option '-qversion'; did you mean '--version'? g++: fatal error: no input files compilation terminated. -configure:3167: $? = 1 -configure:3187: checking whether the C++ compiler works -configure:3209: /opt/psi/Programming/gcc/7.3.0/bin/g++ conftest.cpp >&5 -configure:3213: $? = 0 -configure:3261: result: yes -configure:3264: checking for C++ compiler default output file name -configure:3266: result: a.out -configure:3272: checking for suffix of executables -configure:3279: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest conftest.cpp >&5 -configure:3283: $? = 0 -configure:3305: result: -configure:3327: checking whether we are cross compiling -configure:3335: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest conftest.cpp >&5 -configure:3339: $? = 0 -configure:3346: ./conftest -configure:3350: $? = 0 -configure:3365: result: no -configure:3370: checking for suffix of object files -configure:3392: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c conftest.cpp >&5 -configure:3396: $? = 0 -configure:3417: result: o -configure:3421: checking whether we are using the GNU C++ compiler -configure:3440: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c conftest.cpp >&5 -configure:3440: $? = 0 -configure:3449: result: yes -configure:3458: checking whether /opt/psi/Programming/gcc/7.3.0/bin/g++ accepts -g -configure:3478: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g conftest.cpp >&5 -configure:3478: $? = 0 -configure:3519: result: yes -configure:3553: checking for style of include used by make -configure:3581: result: GNU -configure:3607: checking dependency style of /opt/psi/Programming/gcc/7.3.0/bin/g++ -configure:3718: result: gcc3 -configure:3764: checking build system type -configure:3778: result: x86_64-unknown-linux-gnu -configure:3798: checking host system type -configure:3811: result: x86_64-unknown-linux-gnu -configure:3852: checking how to print strings -configure:3879: result: printf -configure:3948: checking for gcc -configure:3975: result: /opt/psi/Programming/gcc/7.3.0/bin/gcc -configure:4204: checking for C compiler version -configure:4213: /opt/psi/Programming/gcc/7.3.0/bin/gcc --version >&5 -gcc ('PSI Environment Module') 7.3.0 +configure:3209: $? = 1 +configure:3229: checking whether the C++ compiler works +configure:3251: /opt/psi/Programming/gcc/7.5.0/bin/g++ conftest.cpp >&5 +configure:3255: $? = 0 +configure:3303: result: yes +configure:3306: checking for C++ compiler default output file name +configure:3308: result: a.out +configure:3314: checking for suffix of executables +configure:3321: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest conftest.cpp >&5 +configure:3325: $? = 0 +configure:3347: result: +configure:3369: checking whether we are cross compiling +configure:3377: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest conftest.cpp >&5 +configure:3381: $? = 0 +configure:3388: ./conftest +configure:3392: $? = 0 +configure:3407: result: no +configure:3412: checking for suffix of object files +configure:3434: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c conftest.cpp >&5 +configure:3438: $? = 0 +configure:3459: result: o +configure:3463: checking whether we are using the GNU C++ compiler +configure:3482: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c conftest.cpp >&5 +configure:3482: $? = 0 +configure:3491: result: yes +configure:3500: checking whether /opt/psi/Programming/gcc/7.5.0/bin/g++ accepts -g +configure:3520: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g conftest.cpp >&5 +configure:3520: $? = 0 +configure:3561: result: yes +configure:3587: checking whether make supports the include directive +configure:3602: make -f confmf.GNU && cat confinc.out +this is the am__doit target +configure:3605: $? = 0 +configure:3624: result: yes (GNU style) +configure:3649: checking dependency style of /opt/psi/Programming/gcc/7.5.0/bin/g++ +configure:3760: result: gcc3 +configure:3806: checking build system type +configure:3820: result: x86_64-pc-linux-gnu +configure:3840: checking host system type +configure:3853: result: x86_64-pc-linux-gnu +configure:3894: checking how to print strings +configure:3921: result: printf +configure:3990: checking for gcc +configure:4017: result: /opt/psi/Programming/gcc/7.5.0/bin/gcc +configure:4246: checking for C compiler version +configure:4255: /opt/psi/Programming/gcc/7.5.0/bin/gcc --version >&5 +gcc ('PSI Environment Module') 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -configure:4224: $? = 0 -configure:4213: /opt/psi/Programming/gcc/7.3.0/bin/gcc -v >&5 +configure:4266: $? = 0 +configure:4255: /opt/psi/Programming/gcc/7.5.0/bin/gcc -v >&5 Using built-in specs. -COLLECT_GCC=/opt/psi/Programming/gcc/7.3.0/bin/gcc -COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper +COLLECT_GCC=/opt/psi/Programming/gcc/7.5.0/bin/gcc +COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.5.0/lto-wrapper Target: x86_64-pc-linux-gnu -Configured with: /opt/tmp/stadler_h/src/gcc-7.3.0/configure --prefix=/opt/psi/Programming/gcc/7.3.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran --with-gmp=/opt/psi/Libraries/gmp/6.1.2 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.0 --with-mpc=/opt/psi/Libraries/mpc/1.1.0 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug +Configured with: /var/tmp/gsell/gcc-7.5.0/src/configure --prefix=/opt/psi/Programming/gcc/7.5.0 --with-gmp=/opt/psi/Libraries/gmp/6.2.0 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.2-1 --with-mpc=/opt/psi/Libraries/mpc/1.1.0-4 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug Thread model: posix -gcc version 7.3.0 ('PSI Environment Module') -configure:4224: $? = 0 -configure:4213: /opt/psi/Programming/gcc/7.3.0/bin/gcc -V >&5 +gcc version 7.5.0 ('PSI Environment Module') +configure:4266: $? = 0 +configure:4255: /opt/psi/Programming/gcc/7.5.0/bin/gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. -configure:4224: $? = 1 -configure:4213: /opt/psi/Programming/gcc/7.3.0/bin/gcc -qversion >&5 +configure:4266: $? = 1 +configure:4255: /opt/psi/Programming/gcc/7.5.0/bin/gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files compilation terminated. -configure:4224: $? = 1 -configure:4228: checking whether we are using the GNU C compiler -configure:4247: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c conftest.c >&5 -configure:4247: $? = 0 -configure:4256: result: yes -configure:4265: checking whether /opt/psi/Programming/gcc/7.3.0/bin/gcc accepts -g -configure:4285: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g conftest.c >&5 -configure:4285: $? = 0 -configure:4326: result: yes -configure:4343: checking for /opt/psi/Programming/gcc/7.3.0/bin/gcc option to accept ISO C89 -configure:4406: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:4406: $? = 0 -configure:4419: result: none needed -configure:4441: checking dependency style of /opt/psi/Programming/gcc/7.3.0/bin/gcc -configure:4552: result: gcc3 -configure:4567: checking for a sed that does not truncate output -configure:4631: result: /usr/bin/sed -configure:4649: checking for grep that handles long lines and -e -configure:4707: result: /usr/bin/grep -configure:4712: checking for egrep -configure:4774: result: /usr/bin/grep -E -configure:4779: checking for fgrep -configure:4841: result: /usr/bin/grep -F -configure:4876: checking for ld used by /opt/psi/Programming/gcc/7.3.0/bin/gcc -configure:4943: result: /usr/bin/ld -configure:4950: checking if the linker (/usr/bin/ld) is GNU ld -configure:4965: result: yes -configure:4977: checking for BSD- or MS-compatible name lister (nm) -configure:5031: result: /usr/bin/nm -B -configure:5161: checking the name lister (/usr/bin/nm -B) interface -configure:5168: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 conftest.cpp >&5 -configure:5171: /usr/bin/nm -B "conftest.o" -configure:5174: output +configure:4266: $? = 1 +configure:4270: checking whether we are using the GNU C compiler +configure:4289: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c conftest.c >&5 +configure:4289: $? = 0 +configure:4298: result: yes +configure:4307: checking whether /opt/psi/Programming/gcc/7.5.0/bin/gcc accepts -g +configure:4327: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g conftest.c >&5 +configure:4327: $? = 0 +configure:4368: result: yes +configure:4385: checking for /opt/psi/Programming/gcc/7.5.0/bin/gcc option to accept ISO C89 +configure:4448: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:4448: $? = 0 +configure:4461: result: none needed +configure:4486: checking whether /opt/psi/Programming/gcc/7.5.0/bin/gcc understands -c and -o together +configure:4508: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c conftest.c -o conftest2.o +configure:4511: $? = 0 +configure:4508: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c conftest.c -o conftest2.o +configure:4511: $? = 0 +configure:4523: result: yes +configure:4542: checking dependency style of /opt/psi/Programming/gcc/7.5.0/bin/gcc +configure:4653: result: gcc3 +configure:4668: checking for a sed that does not truncate output +configure:4732: result: /usr/bin/sed +configure:4750: checking for grep that handles long lines and -e +configure:4808: result: /usr/bin/grep +configure:4813: checking for egrep +configure:4875: result: /usr/bin/grep -E +configure:4880: checking for fgrep +configure:4942: result: /usr/bin/grep -F +configure:4977: checking for ld used by /opt/psi/Programming/gcc/7.5.0/bin/gcc +configure:5044: result: /usr/bin/ld +configure:5051: checking if the linker (/usr/bin/ld) is GNU ld +configure:5066: result: yes +configure:5078: checking for BSD- or MS-compatible name lister (nm) +configure:5132: result: /usr/bin/nm -B +configure:5262: checking the name lister (/usr/bin/nm -B) interface +configure:5269: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5 +configure:5272: /usr/bin/nm -B "conftest.o" +configure:5275: output 0000000000000000 B some_variable -configure:5181: result: BSD nm -configure:5184: checking whether ln -s works -configure:5188: result: yes -configure:5196: checking the maximum length of command line arguments -configure:5327: result: 1572864 -configure:5375: checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format -configure:5415: result: func_convert_file_noop -configure:5422: checking how to convert x86_64-unknown-linux-gnu file names to toolchain format -configure:5442: result: func_convert_file_noop -configure:5449: checking for /usr/bin/ld option to reload object files -configure:5456: result: -r -configure:5530: checking for objdump -configure:5546: found /usr/bin/objdump -configure:5557: result: objdump -configure:5589: checking how to recognize dependent libraries -configure:5789: result: pass_all -configure:5874: checking for dlltool -configure:5904: result: no -configure:5934: checking how to associate runtime and link libraries -configure:5961: result: printf %s\n -configure:6022: checking for ar -configure:6038: found /usr/bin/ar -configure:6049: result: ar -configure:6086: checking for archiver @FILE support -configure:6103: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 conftest.cpp >&5 -configure:6103: $? = 0 -configure:6106: ar cru libconftest.a @conftest.lst >&5 -configure:6109: $? = 0 -configure:6114: ar cru libconftest.a @conftest.lst >&5 +configure:5282: result: BSD nm +configure:5285: checking whether ln -s works +configure:5289: result: yes +configure:5297: checking the maximum length of command line arguments +configure:5428: result: 1572864 +configure:5476: checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format +configure:5516: result: func_convert_file_noop +configure:5523: checking how to convert x86_64-pc-linux-gnu file names to toolchain format +configure:5543: result: func_convert_file_noop +configure:5550: checking for /usr/bin/ld option to reload object files +configure:5557: result: -r +configure:5631: checking for objdump +configure:5647: found /usr/bin/objdump +configure:5658: result: objdump +configure:5690: checking how to recognize dependent libraries +configure:5890: result: pass_all +configure:5975: checking for dlltool +configure:6005: result: no +configure:6035: checking how to associate runtime and link libraries +configure:6062: result: printf %s\n +configure:6123: checking for ar +configure:6139: found /usr/bin/ar +configure:6150: result: ar +configure:6187: checking for archiver @FILE support +configure:6204: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5 +configure:6204: $? = 0 +configure:6207: ar cru libconftest.a @conftest.lst >&5 +configure:6210: $? = 0 +configure:6215: ar cru libconftest.a @conftest.lst >&5 ar: conftest.o: No such file or directory -configure:6117: $? = 1 -configure:6129: result: @ -configure:6187: checking for strip -configure:6203: found /usr/bin/strip -configure:6214: result: strip -configure:6286: checking for ranlib -configure:6302: found /usr/bin/ranlib -configure:6313: result: ranlib -configure:6415: checking command to parse /usr/bin/nm -B output from /opt/psi/Programming/gcc/7.3.0/bin/gcc object -configure:6568: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 conftest.cpp >&5 -configure:6571: $? = 0 -configure:6575: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm -configure:6578: $? = 0 -configure:6644: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 conftest.cpp conftstm.o >&5 -configure:6647: $? = 0 -configure:6685: result: ok -configure:6732: checking for sysroot -configure:6762: result: no -configure:6769: checking for a working dd -configure:6807: result: /usr/bin/dd -configure:6811: checking how to truncate binary pipes -configure:6826: result: /usr/bin/dd bs=4096 count=1 -configure:6963: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 conftest.cpp >&5 -configure:6966: $? = 0 -configure:7156: checking for mt -configure:7186: result: no -configure:7206: checking if : is a manifest tool -configure:7212: : '-?' -configure:7220: result: no -configure:7897: checking how to run the C preprocessor -configure:7928: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E conftest.c -configure:7928: $? = 0 -configure:7942: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E conftest.c +configure:6218: $? = 1 +configure:6230: result: @ +configure:6288: checking for strip +configure:6304: found /usr/bin/strip +configure:6315: result: strip +configure:6387: checking for ranlib +configure:6403: found /usr/bin/ranlib +configure:6414: result: ranlib +configure:6516: checking command to parse /usr/bin/nm -B output from /opt/psi/Programming/gcc/7.5.0/bin/gcc object +configure:6669: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5 +configure:6672: $? = 0 +configure:6676: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:6679: $? = 0 +configure:6745: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 conftest.cpp conftstm.o >&5 +configure:6748: $? = 0 +configure:6786: result: ok +configure:6833: checking for sysroot +configure:6863: result: no +configure:6870: checking for a working dd +configure:6908: result: /usr/bin/dd +configure:6912: checking how to truncate binary pipes +configure:6927: result: /usr/bin/dd bs=4096 count=1 +configure:7064: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5 +configure:7067: $? = 0 +configure:7257: checking for mt +configure:7287: result: no +configure:7307: checking if : is a manifest tool +configure:7313: : '-?' +configure:7321: result: no +configure:7998: checking how to run the C preprocessor +configure:8029: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c +configure:8029: $? = 0 +configure:8043: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:7942: $? = 1 +configure:8043: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "CAFE" | #define PACKAGE_TARNAME "cafe" -| #define PACKAGE_VERSION "1.19.1" -| #define PACKAGE_STRING "CAFE 1.19.1" +| #define PACKAGE_VERSION "1.19.3" +| #define PACKAGE_STRING "CAFE 1.19.3" | #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch" | #define PACKAGE_URL "" | #define PACKAGE "cafe" -| #define VERSION "1.19.1" +| #define VERSION "1.19.3" | /* end confdefs.h. */ | #include -configure:7967: result: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E -configure:7987: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E conftest.c -configure:7987: $? = 0 -configure:8001: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E conftest.c +configure:8068: result: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E +configure:8088: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c +configure:8088: $? = 0 +configure:8102: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:8001: $? = 1 +configure:8102: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "CAFE" | #define PACKAGE_TARNAME "cafe" -| #define PACKAGE_VERSION "1.19.1" -| #define PACKAGE_STRING "CAFE 1.19.1" +| #define PACKAGE_VERSION "1.19.3" +| #define PACKAGE_STRING "CAFE 1.19.3" | #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch" | #define PACKAGE_URL "" | #define PACKAGE "cafe" -| #define VERSION "1.19.1" +| #define VERSION "1.19.3" | /* end confdefs.h. */ | #include -configure:8030: checking for ANSI C header files -configure:8050: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8050: $? = 0 -configure:8123: /opt/psi/Programming/gcc/7.3.0/bin/gcc -o conftest -g -O2 conftest.c >&5 -configure:8123: $? = 0 -configure:8123: ./conftest -configure:8123: $? = 0 -configure:8134: result: yes -configure:8147: checking for sys/types.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for sys/stat.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for stdlib.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for string.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for memory.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for strings.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for inttypes.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for stdint.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8147: checking for unistd.h -configure:8147: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8147: $? = 0 -configure:8147: result: yes -configure:8161: checking for dlfcn.h -configure:8161: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:8161: $? = 0 -configure:8161: result: yes -configure:8427: checking for objdir -configure:8442: result: .libs -configure:8706: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc supports -fno-rtti -fno-exceptions -configure:8724: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 +configure:8131: checking for ANSI C header files +configure:8151: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8151: $? = 0 +configure:8224: /opt/psi/Programming/gcc/7.5.0/bin/gcc -o conftest -g -O2 conftest.c >&5 +configure:8224: $? = 0 +configure:8224: ./conftest +configure:8224: $? = 0 +configure:8235: result: yes +configure:8248: checking for sys/types.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for sys/stat.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for stdlib.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for string.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for memory.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for strings.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for inttypes.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for stdint.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8248: checking for unistd.h +configure:8248: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8248: $? = 0 +configure:8248: result: yes +configure:8262: checking for dlfcn.h +configure:8262: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:8262: $? = 0 +configure:8262: result: yes +configure:8528: checking for objdir +configure:8543: result: .libs +configure:8807: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -fno-rtti -fno-exceptions +configure:8825: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C -configure:8728: $? = 0 -configure:8741: result: no -configure:9099: checking for /opt/psi/Programming/gcc/7.3.0/bin/gcc option to produce PIC -configure:9106: result: -fPIC -DPIC -configure:9114: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc PIC flag -fPIC -DPIC works -configure:9132: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 -configure:9136: $? = 0 -configure:9149: result: yes -configure:9178: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc static flag -static works -configure:9206: result: no -configure:9221: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc supports -c -o file.o -configure:9242: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 -configure:9246: $? = 0 -configure:9268: result: yes -configure:9276: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc supports -c -o file.o -configure:9323: result: yes -configure:9356: checking whether the /opt/psi/Programming/gcc/7.3.0/bin/gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries -configure:10615: result: yes -configure:10652: checking whether -lc should be explicitly linked in -configure:10660: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5 -configure:10663: $? = 0 -configure:10678: /opt/psi/Programming/gcc/7.3.0/bin/gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1 -configure:10681: $? = 0 -configure:10695: result: no -configure:10855: checking dynamic linker characteristics -configure:11436: /opt/psi/Programming/gcc/7.3.0/bin/gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 -configure:11436: $? = 0 -configure:11673: result: GNU/Linux ld.so -configure:11795: checking how to hardcode library paths into programs -configure:11820: result: immediate -configure:12368: checking whether stripping libraries is possible -configure:12373: result: yes -configure:12408: checking if libtool supports shared libraries -configure:12410: result: yes -configure:12413: checking whether to build shared libraries -configure:12438: result: yes -configure:12441: checking whether to build static libraries -configure:12445: result: yes -configure:12468: checking how to run the C++ preprocessor -configure:12495: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E conftest.cpp -configure:12495: $? = 0 -configure:12509: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E conftest.cpp +configure:8829: $? = 0 +configure:8842: result: no +configure:9200: checking for /opt/psi/Programming/gcc/7.5.0/bin/gcc option to produce PIC +configure:9207: result: -fPIC -DPIC +configure:9215: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc PIC flag -fPIC -DPIC works +configure:9233: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 +configure:9237: $? = 0 +configure:9250: result: yes +configure:9279: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc static flag -static works +configure:9307: result: no +configure:9322: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -c -o file.o +configure:9343: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 +configure:9347: $? = 0 +configure:9369: result: yes +configure:9377: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -c -o file.o +configure:9424: result: yes +configure:9457: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries +configure:10716: result: yes +configure:10753: checking whether -lc should be explicitly linked in +configure:10761: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5 +configure:10764: $? = 0 +configure:10779: /opt/psi/Programming/gcc/7.5.0/bin/gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1 +configure:10782: $? = 0 +configure:10796: result: no +configure:10956: checking dynamic linker characteristics +configure:11537: /opt/psi/Programming/gcc/7.5.0/bin/gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 +configure:11537: $? = 0 +configure:11777: result: GNU/Linux ld.so +configure:11899: checking how to hardcode library paths into programs +configure:11924: result: immediate +configure:12472: checking whether stripping libraries is possible +configure:12477: result: yes +configure:12512: checking if libtool supports shared libraries +configure:12514: result: yes +configure:12517: checking whether to build shared libraries +configure:12542: result: yes +configure:12545: checking whether to build static libraries +configure:12549: result: yes +configure:12572: checking how to run the C++ preprocessor +configure:12599: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp +configure:12599: $? = 0 +configure:12613: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:12509: $? = 1 +configure:12613: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "CAFE" | #define PACKAGE_TARNAME "cafe" -| #define PACKAGE_VERSION "1.19.1" -| #define PACKAGE_STRING "CAFE 1.19.1" +| #define PACKAGE_VERSION "1.19.3" +| #define PACKAGE_STRING "CAFE 1.19.3" | #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch" | #define PACKAGE_URL "" | #define PACKAGE "cafe" -| #define VERSION "1.19.1" +| #define VERSION "1.19.3" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -420,25 +427,25 @@ configure: failed program was: | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #include -configure:12534: result: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E -configure:12554: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E conftest.cpp -configure:12554: $? = 0 -configure:12568: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E conftest.cpp +configure:12638: result: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E +configure:12658: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp +configure:12658: $? = 0 +configure:12672: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:12568: $? = 1 +configure:12672: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "CAFE" | #define PACKAGE_TARNAME "cafe" -| #define PACKAGE_VERSION "1.19.1" -| #define PACKAGE_STRING "CAFE 1.19.1" +| #define PACKAGE_VERSION "1.19.3" +| #define PACKAGE_STRING "CAFE 1.19.3" | #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch" | #define PACKAGE_URL "" | #define PACKAGE "cafe" -| #define VERSION "1.19.1" +| #define VERSION "1.19.3" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -453,109 +460,130 @@ configure: failed program was: | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #include -configure:12730: checking for ld used by /opt/psi/Programming/gcc/7.3.0/bin/g++ -configure:12797: result: /usr/bin/ld -m elf_x86_64 -configure:12804: checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld -configure:12819: result: yes -configure:12874: checking whether the /opt/psi/Programming/gcc/7.3.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries -configure:13947: result: yes -configure:13983: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 conftest.cpp >&5 -configure:13986: $? = 0 -configure:14467: checking for /opt/psi/Programming/gcc/7.3.0/bin/g++ option to produce PIC -configure:14474: result: -fPIC -DPIC -configure:14482: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ PIC flag -fPIC -DPIC works -configure:14500: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5 -configure:14504: $? = 0 -configure:14517: result: yes -configure:14540: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ static flag -static works -configure:14568: result: no -configure:14580: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ supports -c -o file.o -configure:14601: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 -configure:14605: $? = 0 -configure:14627: result: yes -configure:14632: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ supports -c -o file.o -configure:14679: result: yes -configure:14709: checking whether the /opt/psi/Programming/gcc/7.3.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries -configure:14749: result: yes -configure:14890: checking dynamic linker characteristics -configure:15635: result: GNU/Linux ld.so -configure:15700: checking how to hardcode library paths into programs -configure:15725: result: immediate -configure:15949: checking cadef.h usability -configure:15949: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc conftest.cpp >&5 -configure:15949: $? = 0 -configure:15949: result: yes -configure:15949: checking cadef.h presence -configure:15949: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc conftest.cpp -configure:15949: $? = 0 -configure:15949: result: yes -configure:15949: checking for cadef.h -configure:15949: result: yes -configure:15968: checking epicsTypes.h usability -configure:15968: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc conftest.cpp >&5 -configure:15968: $? = 0 -configure:15968: result: yes -configure:15968: checking epicsTypes.h presence -configure:15968: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc conftest.cpp -configure:15968: $? = 0 -configure:15968: result: yes -configure:15968: checking for epicsTypes.h -configure:15968: result: yes -configure:15985: checking for main in -lca -configure:16004: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -lca >&5 -configure:16004: $? = 0 -configure:16013: result: yes -configure:16026: checking for main in -lCom -configure:16045: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -lCom >&5 -configure:16045: $? = 0 -configure:16054: result: yes -configure:16067: checking for main in -ldl -configure:16086: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -ldl >&5 -configure:16086: $? = 0 -configure:16095: result: yes -configure:16300: checking multi_index_container.hpp usability -configure:16300: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp >&5 -configure:16300: $? = 0 -configure:16300: result: yes -configure:16300: checking multi_index_container.hpp presence -configure:16300: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp -configure:16300: $? = 0 -configure:16300: result: yes -configure:16300: checking for multi_index_container.hpp -configure:16300: result: yes -configure:17014: checking qxml.h usability -configure:17014: /opt/psi/Programming/gcc/7.3.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml conftest.cpp >&5 -configure:17014: $? = 0 -configure:17014: result: yes -configure:17014: checking qxml.h presence -configure:17014: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml conftest.cpp -configure:17014: $? = 0 -configure:17014: result: yes -configure:17014: checking for qxml.h -configure:17014: result: yes -configure:17124: checking for write in -lQt5Core -configure:17149: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib conftest.cpp -lQt5Core >&5 -configure:17149: $? = 0 -configure:17158: result: yes -configure:17176: checking for qt_version_tag in -lQt5Xml -configure:17201: /opt/psi/Programming/gcc/7.3.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib conftest.cpp -lQt5Xml -lQt5Core >&5 -configure:17201: $? = 0 -configure:17210: result: yes -configure:18061: checking that generated files are newer than configure -configure:18067: result: done -configure:18106: creating ./config.status +configure:12834: checking for ld used by /opt/psi/Programming/gcc/7.5.0/bin/g++ +configure:12901: result: /usr/bin/ld -m elf_x86_64 +configure:12908: checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld +configure:12923: result: yes +configure:12978: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries +configure:14051: result: yes +configure:14087: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5 +configure:14090: $? = 0 +configure:14571: checking for /opt/psi/Programming/gcc/7.5.0/bin/g++ option to produce PIC +configure:14578: result: -fPIC -DPIC +configure:14586: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ PIC flag -fPIC -DPIC works +configure:14604: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5 +configure:14608: $? = 0 +configure:14621: result: yes +configure:14644: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ static flag -static works +configure:14672: result: no +configure:14684: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ supports -c -o file.o +configure:14705: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 +configure:14709: $? = 0 +configure:14731: result: yes +configure:14736: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ supports -c -o file.o +configure:14783: result: yes +configure:14813: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries +configure:14853: result: yes +configure:14994: checking dynamic linker characteristics +configure:15742: result: GNU/Linux ld.so +configure:15807: checking how to hardcode library paths into programs +configure:15832: result: immediate +configure:16056: checking cadef.h usability +configure:16056: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc conftest.cpp >&5 +configure:16056: $? = 0 +configure:16056: result: yes +configure:16056: checking cadef.h presence +configure:16056: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc conftest.cpp +configure:16056: $? = 0 +configure:16056: result: yes +configure:16056: checking for cadef.h +configure:16056: result: yes +configure:16075: checking epicsTypes.h usability +configure:16075: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc conftest.cpp >&5 +configure:16075: $? = 0 +configure:16075: result: yes +configure:16075: checking epicsTypes.h presence +configure:16075: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc conftest.cpp +configure:16075: $? = 0 +configure:16075: result: yes +configure:16075: checking for epicsTypes.h +configure:16075: result: yes +configure:16092: checking for main in -lca +configure:16111: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 conftest.cpp -lca >&5 +configure:16111: $? = 0 +configure:16120: result: yes +configure:16133: checking for main in -lCom +configure:16152: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 conftest.cpp -lCom >&5 +configure:16152: $? = 0 +configure:16161: result: yes +configure:16174: checking for main in -ldl +configure:16193: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 conftest.cpp -ldl >&5 +configure:16193: $? = 0 +configure:16202: result: yes +configure:16407: checking multi_index_container.hpp usability +configure:16407: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp >&5 +configure:16407: $? = 0 +configure:16407: result: yes +configure:16407: checking multi_index_container.hpp presence +configure:16407: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp +configure:16407: $? = 0 +configure:16407: result: yes +configure:16407: checking for multi_index_container.hpp +configure:16407: result: yes +configure:16631: checking Python.h usability +configure:16631: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include conftest.cpp >&5 +configure:16631: $? = 0 +configure:16631: result: yes +configure:16631: checking Python.h presence +configure:16631: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include conftest.cpp +configure:16631: $? = 0 +configure:16631: result: yes +configure:16631: checking for Python.h +configure:16631: result: yes +configure:16650: checking for main in -lpython3.10 +configure:16669: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib conftest.cpp -lpython3.10 >&5 +configure:16669: $? = 0 +configure:16678: result: yes +configure:18168: checking that generated files are newer than configure +configure:18174: result: done +configure:18213: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by CAFE config.status 1.19.3, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on sf-lc8.psi.ch + +config.status:1176: creating makefile +config.status:1176: creating src/makefile +config.status:1176: creating include/makefile +config.status:1176: creating ./include/config.h +config.status:1405: executing depfiles commands +config.status:1482: cd src && sed -e '/# am--include-marker/d' makefile | make -f - am--depfiles +make: Nothing to be done for 'am--depfiles'. +config.status:1487: $? = 0 +config.status:1405: executing libtool commands ## ---------------- ## ## Cache variables. ## ## ---------------- ## -ac_cv_build=x86_64-unknown-linux-gnu +ac_cv_build=x86_64-pc-linux-gnu ac_cv_c_compiler_gnu=yes ac_cv_cxx_compiler_gnu=yes ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_set=set -ac_cv_env_CC_value=/opt/psi/Programming/gcc/7.3.0/bin/gcc +ac_cv_env_CC_value=/opt/psi/Programming/gcc/7.5.0/bin/gcc ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= @@ -567,7 +595,7 @@ ac_cv_env_CXXCPP_value= ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_set=set -ac_cv_env_CXX_value=/opt/psi/Programming/gcc/7.3.0/bin/g++ +ac_cv_env_CXX_value=/opt/psi/Programming/gcc/7.5.0/bin/g++ ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= @@ -580,13 +608,13 @@ ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= +ac_cv_header_Python_h=yes ac_cv_header_cadef_h=yes ac_cv_header_dlfcn_h=yes ac_cv_header_epicsTypes_h=yes ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_multi_index_container_hpp=yes -ac_cv_header_qxml_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes @@ -595,12 +623,11 @@ ac_cv_header_strings_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_unistd_h=yes -ac_cv_host=x86_64-unknown-linux-gnu +ac_cv_host=x86_64-pc-linux-gnu ac_cv_lib_Com_main=yes -ac_cv_lib_Qt5Core_write=yes -ac_cv_lib_Qt5Xml_qt_version_tag=yes ac_cv_lib_ca_main=yes ac_cv_lib_dl_main=yes +ac_cv_lib_python3_10_main=yes ac_cv_objext=o ac_cv_path_EGREP='/usr/bin/grep -E' ac_cv_path_FGREP='/usr/bin/grep -F' @@ -610,10 +637,10 @@ ac_cv_path_install='/usr/bin/install -c' ac_cv_path_lt_DD=/usr/bin/dd ac_cv_path_mkdir=/usr/bin/mkdir ac_cv_prog_AWK=gawk -ac_cv_prog_CPP='/opt/psi/Programming/gcc/7.3.0/bin/gcc -E' -ac_cv_prog_CXXCPP='/opt/psi/Programming/gcc/7.3.0/bin/g++ -E' +ac_cv_prog_CPP='/opt/psi/Programming/gcc/7.5.0/bin/gcc -E' +ac_cv_prog_CXXCPP='/opt/psi/Programming/gcc/7.5.0/bin/g++ -E' ac_cv_prog_ac_ct_AR=ar -ac_cv_prog_ac_ct_CC=/opt/psi/Programming/gcc/7.3.0/bin/gcc +ac_cv_prog_ac_ct_CC=/opt/psi/Programming/gcc/7.5.0/bin/gcc ac_cv_prog_ac_ct_OBJDUMP=objdump ac_cv_prog_ac_ct_RANLIB=ranlib ac_cv_prog_ac_ct_STRIP=strip @@ -624,6 +651,7 @@ ac_cv_prog_make_make_set=yes am_cv_CC_dependencies_compiler_type=gcc3 am_cv_CXX_dependencies_compiler_type=gcc3 am_cv_make_support_nested_variables=yes +am_cv_prog_cc_c_o=yes lt_cv_ar_at_file=@ lt_cv_archive_cmds_need_lc=no lt_cv_deplibs_check_method=pass_all @@ -663,30 +691,30 @@ lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' ## Output variables. ## ## ----------------- ## -ACLOCAL='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13' +ACLOCAL='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.16' AMDEPBACKSLASH='\' AMDEP_FALSE='#' AMDEP_TRUE='' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' -AM_CPPFLAGS=' -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml' +AM_CPPFLAGS=' -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='1' -AM_LDFLAGS=' -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib ' +AM_LDFLAGS=' -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib' AM_V='$(V)' AR='ar' AUTOCONF='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf' AUTOHEADER='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader' -AUTOMAKE='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13' +AUTOMAKE='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.16' AWK='gawk' CAFE_CPPFLAGS='-I$(top_srcdir)/include ' -CC='/opt/psi/Programming/gcc/7.3.0/bin/gcc' +CC='/opt/psi/Programming/gcc/7.5.0/bin/gcc' CCDEPMODE='depmode=gcc3' CFLAGS='-g -O2' -CPP='/opt/psi/Programming/gcc/7.3.0/bin/gcc -E' -CPPFLAGS=' -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml' -CXX='/opt/psi/Programming/gcc/7.3.0/bin/g++' -CXXCPP='/opt/psi/Programming/gcc/7.3.0/bin/g++ -E' +CPP='/opt/psi/Programming/gcc/7.5.0/bin/gcc -E' +CPPFLAGS=' -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include' +CXX='/opt/psi/Programming/gcc/7.5.0/bin/g++' +CXXCPP='/opt/psi/Programming/gcc/7.5.0/bin/g++ -E' CXXDEPMODE='depmode=gcc3' CXXFLAGS='-g -O2' CYGPATH_W='echo' @@ -702,10 +730,10 @@ EGREP='/usr/bin/grep -E' EXEEXT='' FGREP='/usr/bin/grep -F' GREP='/usr/bin/grep' -HAVE_PYCAFE_EXT__FALSE='' -HAVE_PYCAFE_EXT__TRUE='#' -HAVE_PYTHON__FALSE='' -HAVE_PYTHON__TRUE='#' +HAVE_PYCAFE_EXT__FALSE='#' +HAVE_PYCAFE_EXT__TRUE='' +HAVE_PYTHON__FALSE='#' +HAVE_PYTHON__TRUE='' HAVE_ZEROMQ__FALSE='' HAVE_ZEROMQ__TRUE='#' INSTALL_DATA='${INSTALL} -m 644' @@ -713,9 +741,9 @@ INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='/usr/bin/ld -m elf_x86_64' -LDFLAGS=' -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib ' +LDFLAGS=' -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib' LIBOBJS='' -LIBS='-lQt5Xml -lQt5Core ' +LIBS='-lpython3.10 ' LIBTOOL='$(SHELL) $(top_builddir)/libtool' LIPO='' LN_S='ln -s' @@ -733,19 +761,19 @@ OTOOL='' PACKAGE='cafe' PACKAGE_BUGREPORT='Bug reports to: jan.chrin@psi.ch' PACKAGE_NAME='CAFE' -PACKAGE_STRING='CAFE 1.19.1' +PACKAGE_STRING='CAFE 1.19.3' PACKAGE_TARNAME='cafe' PACKAGE_URL='' -PACKAGE_VERSION='1.19.1' +PACKAGE_VERSION='1.19.3' PATH_SEPARATOR=':' RANLIB='ranlib' SED='/usr/bin/sed' SET_MAKE='' SHELL='/bin/sh' STRIP='strip' -VERSION='1.19.1' +VERSION='1.19.3' ac_ct_AR='ar' -ac_ct_CC='/opt/psi/Programming/gcc/7.3.0/bin/gcc' +ac_ct_CC='/opt/psi/Programming/gcc/7.5.0/bin/gcc' ac_ct_CXX='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' @@ -762,26 +790,26 @@ am__quote='' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' bindir='${exec_prefix}/bin' -build='x86_64-unknown-linux-gnu' +build='x86_64-pc-linux-gnu' build_alias='' build_cpu='x86_64' build_os='linux-gnu' -build_vendor='unknown' +build_vendor='pc' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='${prefix}' -host='x86_64-unknown-linux-gnu' +host='x86_64-pc-linux-gnu' host_alias='' host_cpu='x86_64' host_os='linux-gnu' -host_vendor='unknown' +host_vendor='pc' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh' -libdir='/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64' +libdir='/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' @@ -789,7 +817,7 @@ mandir='${datarootdir}/man' mkdir_p='$(MKDIR_P)' oldincludedir='/usr/include' pdfdir='${docdir}' -prefix='/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0' +prefix='/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' @@ -804,12 +832,12 @@ target_alias='' /* confdefs.h */ #define PACKAGE_NAME "CAFE" #define PACKAGE_TARNAME "cafe" -#define PACKAGE_VERSION "1.19.1" -#define PACKAGE_STRING "CAFE 1.19.1" +#define PACKAGE_VERSION "1.19.3" +#define PACKAGE_STRING "CAFE 1.19.3" #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch" #define PACKAGE_URL "" #define PACKAGE "cafe" -#define VERSION "1.19.1" +#define VERSION "1.19.3" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 @@ -825,57 +853,15 @@ target_alias='' #define HAVE_LINUX 1 #define HAVE_CADEF_H 1 #define HAVE_EPICSTYPES_H 1 -#define HAVE_EPICS 7.4.1 +#define HAVE_EPICS 7.0.7 #define EPICS_MAJOR 7 -#define EPICS_MINOR 4 -#define EPICS_PATCH 1 +#define EPICS_MINOR 0 +#define EPICS_PATCH 7 #define HAVE_MULTI_INDEX_CONTAINER_HPP 1 #define HAVE_BOOST 1 -#define HAVE_QXML_H 1 -#define HAVE_LIBQT5CORE 1 -#define HAVE_LIBQT5XML 1 -#define HAVE_QT 1 -#define HAVE_LIBQTXML 1 -#define QT_NO_VERSION_TAGGING 1 +#define HAVE_PYTHON_H 1 +#define HAVE_LIBPYTHON3_10 1 +#define HAVE_PYTHON 1 +#define HAVE_PYCAFE_EXT 1 configure: exit 0 - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by CAFE config.status 1.19.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on gfa-lc7.psi.ch - -config.status:1178: creating makefile -config.status:1178: creating src/makefile -config.status:1178: creating include/makefile -config.status:1178: creating ./include/config.h -config.status:1407: executing depfiles commands -config.status:1407: executing libtool commands - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by CAFE config.status 1.19.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status ./include/config.h - -on gfa-lc7.psi.ch - -config.status:1178: creating ./include/config.h -config.status:1359: ./include/config.h is unchanged diff --git a/config.status b/config.status index 69b43e3..32d3b99 100755 --- a/config.status +++ b/config.status @@ -380,7 +380,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by CAFE $as_me 1.19.1, which was +This file was extended by CAFE $as_me 1.19.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -427,9 +427,9 @@ $config_commands Report bugs to ." -ac_cs_config="'--prefix=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0' '--libdir=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64' '--enable-boost-inc' '--enable-epics7' '--enable-qt5' '--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include' '--with-epics3=/usr/local/epics/base' '--with-python310=/ioc/python/latest' '--with-python38=/opt/gfa/python-3.8/latest' '--with-python37=/opt/gfa/python-3.7/latest' '--with-python35=/opt/gfa/python-3.5/latest' '--with-python34=/opt/psi/Programming/psi-python34/2.1.0' '--with-qt5py310=/ioc/python/latest' '--with-qt5py38=/opt/gfa/python-3.8/latest' '--with-qt5=/opt/gfa/python-3.7/latest' '--with-qt4=/opt/gfa/python-3.5/latest' '--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0' '--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2' '--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0' '--with-curl=/sf/bd/deps/zmq/curl-7.55.1' '--with-lz4=/sf/bd/deps/zmq/lz4/lib' '--with-epics7=/usr/local/epics/base-7.0.6' 'CXX=/opt/psi/Programming/gcc/7.3.0/bin/g++' 'CC=/opt/psi/Programming/gcc/7.3.0/bin/gcc'" +ac_cs_config="'--prefix=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0' '--libdir=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64' '--enable-boost-inc' '--enable-epics7' '--enable-python310' '--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include' '--with-epics3=/usr/local/epics/base' '--with-python310=/opt/gfa/python-3.10/latest' '--with-python38=/opt/gfa/python-3.8/latest' '--with-python37=/opt/gfa/python-3.7/latest' '--with-python35=/opt/gfa/python-3.5/latest' '--with-python34=/opt/psi/Programming/psi-python34/2.1.0' '--with-qt5py310=/opt/gfa/python-3.10/latest' '--with-qt5py38=/opt/gfa/python-3.8/latest' '--with-qt5=/opt/gfa/python-3.7/latest' '--with-qt4=/opt/gfa/python-3.5/latest' '--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0' '--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2' '--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0' '--with-curl=/sf/bd/deps/zmq/curl-7.55.1' '--with-lz4=/sf/bd/deps/zmq/lz4/lib' '--with-epics7=/usr/local/epics/base-7.0.7' 'CXX=/opt/psi/Programming/gcc/7.5.0/bin/g++' 'CC=/opt/psi/Programming/gcc/7.5.0/bin/gcc'" ac_cs_version="\ -CAFE config.status 1.19.1 +CAFE config.status 1.19.3 configured by ./configure, generated by GNU Autoconf 2.69, with options \"$ac_cs_config\" @@ -519,7 +519,7 @@ if $ac_cs_silent; then fi if $ac_cs_recheck; then - set X /bin/sh './configure' '--prefix=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0' '--libdir=/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64' '--enable-boost-inc' '--enable-epics7' '--enable-qt5' '--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include' '--with-epics3=/usr/local/epics/base' '--with-python310=/ioc/python/latest' '--with-python38=/opt/gfa/python-3.8/latest' '--with-python37=/opt/gfa/python-3.7/latest' '--with-python35=/opt/gfa/python-3.5/latest' '--with-python34=/opt/psi/Programming/psi-python34/2.1.0' '--with-qt5py310=/ioc/python/latest' '--with-qt5py38=/opt/gfa/python-3.8/latest' '--with-qt5=/opt/gfa/python-3.7/latest' '--with-qt4=/opt/gfa/python-3.5/latest' '--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0' '--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2' '--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0' '--with-curl=/sf/bd/deps/zmq/curl-7.55.1' '--with-lz4=/sf/bd/deps/zmq/lz4/lib' '--with-epics7=/usr/local/epics/base-7.0.6' 'CXX=/opt/psi/Programming/gcc/7.3.0/bin/g++' 'CC=/opt/psi/Programming/gcc/7.3.0/bin/gcc' $ac_configure_extra_args --no-create --no-recursion + set X /bin/sh './configure' '--prefix=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0' '--libdir=/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64' '--enable-boost-inc' '--enable-epics7' '--enable-python310' '--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include' '--with-epics3=/usr/local/epics/base' '--with-python310=/opt/gfa/python-3.10/latest' '--with-python38=/opt/gfa/python-3.8/latest' '--with-python37=/opt/gfa/python-3.7/latest' '--with-python35=/opt/gfa/python-3.5/latest' '--with-python34=/opt/psi/Programming/psi-python34/2.1.0' '--with-qt5py310=/opt/gfa/python-3.10/latest' '--with-qt5py38=/opt/gfa/python-3.8/latest' '--with-qt5=/opt/gfa/python-3.7/latest' '--with-qt4=/opt/gfa/python-3.5/latest' '--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0' '--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2' '--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0' '--with-curl=/sf/bd/deps/zmq/curl-7.55.1' '--with-lz4=/sf/bd/deps/zmq/lz4/lib' '--with-epics7=/usr/local/epics/base-7.0.7' 'CXX=/opt/psi/Programming/gcc/7.5.0/bin/g++' 'CC=/opt/psi/Programming/gcc/7.5.0/bin/gcc' $ac_configure_extra_args --no-create --no-recursion shift $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6 CONFIG_SHELL='/bin/sh' @@ -539,7 +539,7 @@ _ASBOX # # INIT-COMMANDS # -AMDEP_TRUE="" ac_aux_dir="./" +AMDEP_TRUE="" MAKE="make" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -560,10 +560,10 @@ SHELL='/bin/sh' ECHO='printf %s\n' PATH_SEPARATOR=':' host_alias='' -host='x86_64-unknown-linux-gnu' +host='x86_64-pc-linux-gnu' host_os='linux-gnu' build_alias='' -build='x86_64-unknown-linux-gnu' +build='x86_64-pc-linux-gnu' build_os='linux-gnu' SED='/usr/bin/sed' Xsed='/usr/bin/sed -e 1s/^X//' @@ -599,9 +599,9 @@ old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib' old_postuninstall_cmds='' old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' lock_old_archive_extraction='no' -CC='/opt/psi/Programming/gcc/7.3.0/bin/gcc' +CC='/opt/psi/Programming/gcc/7.5.0/bin/gcc' CFLAGS='-g -O2' -compiler='/opt/psi/Programming/gcc/7.3.0/bin/g++' +compiler='/opt/psi/Programming/gcc/7.5.0/bin/g++' GCC='yes' lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' @@ -678,8 +678,8 @@ postuninstall_cmds='' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' finish_eval='' hardcode_into_libs='yes' -sys_lib_search_path_spec='/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib/gcc /opt/psi/Programming/gcc/7.3.0/lib64 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib64 /lib64 /usr/lib64 /opt/psi/Programming/gcc/7.3.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib /lib /usr/lib ' -configure_time_dlsearch_path='/lib /usr/lib /usr/lib64/atlas /usr/lib64//bind9-export/ /opt/rh/devtoolset-6/root/usr/lib64/dyninst /usr/lib64/dyninst /usr/lib64/llvm /usr/lib64/mysql /usr/lib/oracle/12.2/client64/lib /usr/lib64/tcl8.5/tclx8.4 /usr/lib64/tcl8.5 /usr/lib64/wine/ ' +sys_lib_search_path_spec='/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib/gcc/x86_64-pc-linux-gnu/7.5.0 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib/gcc /opt/psi/Programming/gcc/7.5.0/lib64 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib64 /lib64 /usr/lib64 /opt/psi/Programming/gcc/7.5.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib /lib /usr/lib ' +configure_time_dlsearch_path='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/dyninst /usr/lib/oracle/19.18/client64/lib /usr/lib64/tclx8.6 /usr/lib64/wine/ ' configure_time_lt_sys_library_path='' hardcode_action='immediate' enable_dlopen='unknown' @@ -697,7 +697,7 @@ LD_CXX='/usr/bin/ld -m elf_x86_64' reload_flag_CXX=' -r' reload_cmds_CXX='$LD$reload_flag -o $output$reload_objs' old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib' -compiler_CXX='/opt/psi/Programming/gcc/7.3.0/bin/g++' +compiler_CXX='/opt/psi/Programming/gcc/7.5.0/bin/g++' GCC_CXX='yes' lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' lt_prog_compiler_pic_CXX=' -fPIC -DPIC' @@ -735,16 +735,16 @@ prelink_cmds_CXX='' postlink_cmds_CXX='' file_list_spec_CXX='' hardcode_action_CXX='immediate' -compiler_lib_search_dirs_CXX='/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc /opt/psi/Programming/gcc/7.3.0/lib64/../lib64 /opt/psi/Programming/gcc/7.3.0/lib/../lib64 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /opt/psi/Programming/gcc/7.3.0/lib64 /opt/psi/Programming/gcc/7.3.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../..' -predep_objects_CXX='/lib/../lib64/crti.o /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtbeginS.o' -postdep_objects_CXX='/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtendS.o /lib/../lib64/crtn.o' +compiler_lib_search_dirs_CXX='/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc /opt/psi/Programming/gcc/7.5.0/lib64/../lib64 /opt/psi/Programming/gcc/7.5.0/lib/../lib64 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /opt/psi/Programming/gcc/7.5.0/lib64 /opt/psi/Programming/gcc/7.5.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../..' +predep_objects_CXX='/lib/../lib64/crti.o /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/crtbeginS.o' +postdep_objects_CXX='/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/crtendS.o /lib/../lib64/crtn.o' predeps_CXX='' postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s' -compiler_lib_search_path_CXX='-L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc -L/opt/psi/Programming/gcc/7.3.0/lib64/../lib64 -L/opt/psi/Programming/gcc/7.3.0/lib/../lib64 -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/psi/Programming/gcc/7.3.0/lib64 -L/opt/psi/Programming/gcc/7.3.0/lib -L/opt/psi/Tools/HDFView/3.1.2/lib -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../..' +compiler_lib_search_path_CXX='-L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0 -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc -L/opt/psi/Programming/gcc/7.5.0/lib64/../lib64 -L/opt/psi/Programming/gcc/7.5.0/lib/../lib64 -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/psi/Programming/gcc/7.5.0/lib64 -L/opt/psi/Programming/gcc/7.5.0/lib -L/opt/psi/Tools/HDFView/3.1.2/lib -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../..' -LTCC='/opt/psi/Programming/gcc/7.3.0/bin/gcc' +LTCC='/opt/psi/Programming/gcc/7.5.0/bin/gcc' LTCFLAGS='-g -O2' -compiler='/opt/psi/Programming/gcc/7.3.0/bin/gcc' +compiler='/opt/psi/Programming/gcc/7.5.0/bin/gcc' # A function that is used when there is no print builtin or printf. func_fallback_echo () @@ -788,7 +788,7 @@ fi PACKAGE='cafe' - VERSION='1.19.1' + VERSION='1.19.3' RM='rm -f' ofile='libtool' @@ -879,18 +879,18 @@ S["LTLIBOBJS"]="" S["LIBOBJS"]="" S["HAVE_ZEROMQ__FALSE"]="" S["HAVE_ZEROMQ__TRUE"]="#" -S["HAVE_PYCAFE_EXT__FALSE"]="" -S["HAVE_PYCAFE_EXT__TRUE"]="#" -S["HAVE_PYTHON__FALSE"]="" -S["HAVE_PYTHON__TRUE"]="#" -S["AM_LDFLAGS"]=" -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpat"\ -"h,/opt/gfa/python-3.7/latest/lib " -S["AM_CPPFLAGS"]=" -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/i"\ -"nclude/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/includ"\ -"e/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml" +S["HAVE_PYCAFE_EXT__FALSE"]="#" +S["HAVE_PYCAFE_EXT__TRUE"]="" +S["HAVE_PYTHON__FALSE"]="#" +S["HAVE_PYTHON__TRUE"]="" +S["AM_LDFLAGS"]=" -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpat"\ +"h,/opt/gfa/python-3.10/latest/lib" +S["AM_CPPFLAGS"]=" -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/i"\ +"nclude/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/includ"\ +"e/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include" S["CAFE_CPPFLAGS"]="-I$(top_srcdir)/include " -S["CXXCPP"]="/opt/psi/Programming/gcc/7.3.0/bin/g++ -E" -S["CPP"]="/opt/psi/Programming/gcc/7.3.0/bin/gcc -E" +S["CXXCPP"]="/opt/psi/Programming/gcc/7.5.0/bin/g++ -E" +S["CPP"]="/opt/psi/Programming/gcc/7.5.0/bin/gcc -E" S["LT_SYS_LIBRARY_PATH"]="" S["OTOOL64"]="" S["OTOOL"]="" @@ -915,17 +915,17 @@ S["SED"]="/usr/bin/sed" S["am__fastdepCC_FALSE"]="#" S["am__fastdepCC_TRUE"]="" S["CCDEPMODE"]="depmode=gcc3" -S["ac_ct_CC"]="/opt/psi/Programming/gcc/7.3.0/bin/gcc" +S["ac_ct_CC"]="/opt/psi/Programming/gcc/7.5.0/bin/gcc" S["CFLAGS"]="-g -O2" -S["CC"]="/opt/psi/Programming/gcc/7.3.0/bin/gcc" +S["CC"]="/opt/psi/Programming/gcc/7.5.0/bin/gcc" S["host_os"]="linux-gnu" -S["host_vendor"]="unknown" +S["host_vendor"]="pc" S["host_cpu"]="x86_64" -S["host"]="x86_64-unknown-linux-gnu" +S["host"]="x86_64-pc-linux-gnu" S["build_os"]="linux-gnu" -S["build_vendor"]="unknown" +S["build_vendor"]="pc" S["build_cpu"]="x86_64" -S["build"]="x86_64-unknown-linux-gnu" +S["build"]="x86_64-pc-linux-gnu" S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool" S["am__fastdepCXX_FALSE"]="#" S["am__fastdepCXX_TRUE"]="" @@ -934,19 +934,18 @@ S["am__nodep"]="_no" S["AMDEPBACKSLASH"]="\\" S["AMDEP_FALSE"]="#" S["AMDEP_TRUE"]="" -S["am__quote"]="" S["am__include"]="include" S["DEPDIR"]=".deps" S["OBJEXT"]="o" S["EXEEXT"]="" S["ac_ct_CXX"]="" -S["CPPFLAGS"]=" -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/i"\ -"nclude/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/includ"\ -"e/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml" -S["LDFLAGS"]=" -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpat"\ -"h,/opt/gfa/python-3.7/latest/lib " +S["CPPFLAGS"]=" -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/i"\ +"nclude/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/includ"\ +"e/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include" +S["LDFLAGS"]=" -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpat"\ +"h,/opt/gfa/python-3.10/latest/lib" S["CXXFLAGS"]="-g -O2" -S["CXX"]="/opt/psi/Programming/gcc/7.3.0/bin/g++" +S["CXX"]="/opt/psi/Programming/gcc/7.5.0/bin/g++" S["AM_BACKSLASH"]="\\" S["AM_DEFAULT_VERBOSITY"]="1" S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" @@ -964,10 +963,10 @@ S["STRIP"]="strip" S["install_sh"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh" S["MAKEINFO"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing makeinfo" S["AUTOHEADER"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader" -S["AUTOMAKE"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13" +S["AUTOMAKE"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.16" S["AUTOCONF"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf" -S["ACLOCAL"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13" -S["VERSION"]="1.19.1" +S["ACLOCAL"]="${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.16" +S["VERSION"]="1.19.3" S["PACKAGE"]="cafe" S["CYGPATH_W"]="echo" S["am__isrc"]="" @@ -977,14 +976,14 @@ S["INSTALL_PROGRAM"]="${INSTALL}" S["target_alias"]="" S["host_alias"]="" S["build_alias"]="" -S["LIBS"]="-lQt5Xml -lQt5Core " +S["LIBS"]="-lpython3.10 " S["ECHO_T"]="" S["ECHO_N"]="-n" S["ECHO_C"]="" S["DEFS"]="-DHAVE_CONFIG_H" S["mandir"]="${datarootdir}/man" S["localedir"]="${datarootdir}/locale" -S["libdir"]="/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64" +S["libdir"]="/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64" S["psdir"]="${docdir}" S["pdfdir"]="${docdir}" S["dvidir"]="${docdir}" @@ -1002,16 +1001,17 @@ S["libexecdir"]="${exec_prefix}/libexec" S["sbindir"]="${exec_prefix}/sbin" S["bindir"]="${exec_prefix}/bin" S["program_transform_name"]="s,x,x," -S["prefix"]="/opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0" +S["prefix"]="/opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0" S["exec_prefix"]="${prefix}" S["PACKAGE_URL"]="" S["PACKAGE_BUGREPORT"]="Bug reports to: jan.chrin@psi.ch" -S["PACKAGE_STRING"]="CAFE 1.19.1" -S["PACKAGE_VERSION"]="1.19.1" +S["PACKAGE_STRING"]="CAFE 1.19.3" +S["PACKAGE_VERSION"]="1.19.3" S["PACKAGE_TARNAME"]="cafe" S["PACKAGE_NAME"]="CAFE" S["PATH_SEPARATOR"]=":" S["SHELL"]="/bin/sh" +S["am__quote"]="" _ACAWK cat >>"$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 @@ -1055,12 +1055,12 @@ cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { D["PACKAGE_NAME"]=" \"CAFE\"" D["PACKAGE_TARNAME"]=" \"cafe\"" -D["PACKAGE_VERSION"]=" \"1.19.1\"" -D["PACKAGE_STRING"]=" \"CAFE 1.19.1\"" +D["PACKAGE_VERSION"]=" \"1.19.3\"" +D["PACKAGE_STRING"]=" \"CAFE 1.19.3\"" D["PACKAGE_BUGREPORT"]=" \"Bug reports to: jan.chrin@psi.ch\"" D["PACKAGE_URL"]=" \"\"" D["PACKAGE"]=" \"cafe\"" -D["VERSION"]=" \"1.19.1\"" +D["VERSION"]=" \"1.19.3\"" D["STDC_HEADERS"]=" 1" D["HAVE_SYS_TYPES_H"]=" 1" D["HAVE_SYS_STAT_H"]=" 1" @@ -1076,18 +1076,16 @@ D["LT_OBJDIR"]=" \".libs/\"" D["HAVE_LINUX"]=" 1" D["HAVE_CADEF_H"]=" 1" D["HAVE_EPICSTYPES_H"]=" 1" -D["HAVE_EPICS"]=" 7.4.1" +D["HAVE_EPICS"]=" 7.0.7" D["EPICS_MAJOR"]=" 7" -D["EPICS_MINOR"]=" 4" -D["EPICS_PATCH"]=" 1" +D["EPICS_MINOR"]=" 0" +D["EPICS_PATCH"]=" 7" D["HAVE_MULTI_INDEX_CONTAINER_HPP"]=" 1" D["HAVE_BOOST"]=" 1" -D["HAVE_QXML_H"]=" 1" -D["HAVE_LIBQT5CORE"]=" 1" -D["HAVE_LIBQT5XML"]=" 1" -D["HAVE_QT"]=" 1" -D["HAVE_LIBQTXML"]=" 1" -D["QT_NO_VERSION_TAGGING"]=" 1" +D["HAVE_PYTHON_H"]=" 1" +D["HAVE_LIBPYTHON3_10"]=" 1" +D["HAVE_PYTHON"]=" 1" +D["HAVE_PYCAFE_EXT"]=" 1" for (key in D) D_is_set[key] = 1 FS = "" } @@ -1415,29 +1413,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1455,53 +1459,48 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)[^/].*/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/config.sub b/config.sub index c765b34..20f7cf2 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-04-24' +timestamp='2018-05-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2013-04-24' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -25,7 +25,7 @@ timestamp='2013-04-24' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -33,7 +33,7 @@ timestamp='2013-04-24' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,12 +53,11 @@ timestamp='2013-04-24' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -95,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -111,28 +110,48 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; +# Spilt fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -369,18 +399,20 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -400,8 +432,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -410,19 +444,23 @@ case $basic_machine in | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -430,6 +468,8 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -443,7 +483,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -477,7 +517,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -506,6 +546,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -519,7 +562,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -527,13 +570,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -622,10 +665,18 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -715,9 +766,6 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -730,26 +778,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -767,17 +815,17 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -794,7 +842,7 @@ case $basic_machine in os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -809,10 +857,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -822,15 +870,19 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -869,7 +921,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -914,6 +966,12 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -946,7 +1004,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -962,7 +1020,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -977,16 +1035,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -996,23 +1054,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1066,17 +1124,10 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1095,7 +1146,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1217,6 +1268,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1225,20 +1279,12 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1267,10 +1313,6 @@ case $basic_machine in vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1280,9 +1322,6 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1302,7 +1341,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1310,10 +1349,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1321,11 +1360,11 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1336,45 +1375,48 @@ case $os in -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1391,12 +1433,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1405,10 +1447,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1419,12 +1461,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1449,7 +1485,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1471,7 +1507,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1486,32 +1522,44 @@ case $os in -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; + -ios) + ;; -none) ;; + -*-eabi) + case $basic_machine in + arm*) + ;; + esac + ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1546,6 +1594,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1589,9 +1640,6 @@ case $basic_machine in mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; @@ -1601,12 +1649,12 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1646,7 +1694,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1661,9 +1709,6 @@ case $basic_machine in i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1773,15 +1818,15 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/configurePSI.ac b/configurePSI.ac index 6e2bc4f..3cdfbc4 100644 --- a/configurePSI.ac +++ b/configurePSI.ac @@ -9,7 +9,7 @@ # Standard macros AC_PREREQ(2.63) AC_COPYRIGHT([CAFE, Jan Chrin, PSI, 2010-2023]) -AC_INIT([CAFE], [1.19.1], [Bug reports to: jan.chrin@psi.ch]) +AC_INIT([CAFE], [1.19.3], [Bug reports to: jan.chrin@psi.ch]) AC_CONFIG_AUX_DIR(./) @@ -93,7 +93,7 @@ if test x$HAVE_EPICS_3 == xtrue ; then EPICS_PREFIX=$withval EPICS_INCL_PATH="-I"${EPICS_PREFIX}"/include/ \ -I"${EPICS_PREFIX}"/include/os/"${HOST_ARCH} - EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${EPICS_HOST_ARCH} + EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${RHREL}"-x86_64" ## Add epics release EPICS_MAJOR_DEFAULT="3" EPICS_MINOR_DEFAULT="14" @@ -114,7 +114,7 @@ if test x$HAVE_EPICS_7 == xtrue ; then -I"${EPICS_PREFIX}"/include/os/"${HOST_ARCH} EPICS_INCL_PATH=${EPICS_INCL_PATH}" \ -I"${EPICS_PREFIX}"/include/compiler/gcc" - EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${EPICS_HOST_ARCH} + EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${RHREL}"-x86_64" ## Add epics release EPICS_MAJOR_DEFAULT="7" EPICS_MINOR_DEFAULT="4" diff --git a/examples/cafeTest/#makfile7# b/examples/cafeTest/#makfile7# deleted file mode 100644 index b28b04f..0000000 --- a/examples/cafeTest/#makfile7# +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/include/config.h b/include/config.h index ea4e5c1..03dcdba 100644 --- a/include/config.h +++ b/include/config.h @@ -5,10 +5,10 @@ #define EPICS_MAJOR 7 /* epics minor release */ -#define EPICS_MINOR 4 +#define EPICS_MINOR 0 /* epics patch release */ -#define EPICS_PATCH 1 +#define EPICS_PATCH 7 /* Availability of boost */ #define HAVE_BOOST 1 @@ -29,7 +29,7 @@ #define HAVE_DLFCN_H 1 /* epics version */ -#define HAVE_EPICS 7.4.1 +#define HAVE_EPICS 7.0.7 /* Define to 1 if you have the header file. */ #define HAVE_EPICSTYPES_H 1 @@ -57,7 +57,7 @@ /* #undef HAVE_LIBLZ4 */ /* Define to 1 if you have the `python3.10' library (-lpython3.10). */ -/* #undef HAVE_LIBPYTHON3_10 */ +#define HAVE_LIBPYTHON3_10 1 /* Define to 1 if you have the `python3.4m' library (-lpython3.4m). */ /* #undef HAVE_LIBPYTHON3_4M */ @@ -72,16 +72,16 @@ /* #undef HAVE_LIBPYTHON3_8 */ /* Define to 1 if you have the `Qt5Core' library (-lQt5Core). */ -#define HAVE_LIBQT5CORE 1 +/* #undef HAVE_LIBQT5CORE */ /* Define to 1 if you have the `Qt5Xml' library (-lQt5Xml). */ -#define HAVE_LIBQT5XML 1 +/* #undef HAVE_LIBQT5XML */ /* Define to 1 if you have the `QtCore' library (-lQtCore). */ /* #undef HAVE_LIBQTCORE */ /* Availability of Qt version 5 confirmed */ -#define HAVE_LIBQTXML 1 +/* #undef HAVE_LIBQTXML */ /* Define to 1 if you have the `zmq' library (-lzmq). */ /* #undef HAVE_LIBZMQ */ @@ -102,19 +102,19 @@ #define HAVE_MULTI_INDEX_CONTAINER_HPP 1 /* pycafe extern C */ -/* #undef HAVE_PYCAFE_EXT */ +#define HAVE_PYCAFE_EXT 1 /* Availability of python */ -/* #undef HAVE_PYTHON */ +#define HAVE_PYTHON 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_PYTHON_H */ +#define HAVE_PYTHON_H 1 /* Availability of Qt version 5 confirmed */ -#define HAVE_QT 1 +/* #undef HAVE_QT */ /* Define to 1 if you have the header file. */ -#define HAVE_QXML_H 1 +/* #undef HAVE_QXML_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -156,7 +156,7 @@ #define PACKAGE_NAME "CAFE" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "CAFE 1.19.1" +#define PACKAGE_STRING "CAFE 1.19.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "cafe" @@ -165,13 +165,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.19.1" +#define PACKAGE_VERSION "1.19.3" /* Availability of Qt version 5 confirmed */ -#define QT_NO_VERSION_TAGGING 1 +/* #undef QT_NO_VERSION_TAGGING */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.19.1" +#define VERSION "1.19.3" diff --git a/include/connect.h b/include/connect.h index 05358ec..d0776d5 100644 --- a/include/connect.h +++ b/include/connect.h @@ -33,6 +33,8 @@ #endif #include +//include + class Connect { @@ -44,16 +46,12 @@ protected: CAFEGlobalAlarmSeverity epicsAlarmSeverity; CAFEGlobalAlarmCondition epicsAlarmStatus; - cafeConduit_set::iterator itcs; cafeGroup_set::iterator itgs; CAFEDataTypeCode cafeDataTypeCode; - ExceptionsHelper exceptionsHelper; - - PolicyHelper policyHelper; HandleHelper handleHelper; Helper helper; @@ -65,7 +63,7 @@ protected: //connectCallbacks.cc static void callbackHandlerAccessRights(struct access_rights_handler_args args); - static void callbackHandlerException (struct exception_handler_args args); + static void callbackHandlerException (struct exception_handler_args args); //connect.cpp //int createHandle(const char * pv, ca_client_context * ccc, ChannelRequestPolicy channelRequestPolicyPut, unsigned int &handle) diff --git a/include/global.h b/include/global.h index ed885df..5978747 100644 --- a/include/global.h +++ b/include/global.h @@ -9,6 +9,7 @@ #ifndef GLOBAL_H #define GLOBAL_H +#include #include #include #include diff --git a/include/instant.h b/include/instant.h index d752901..48fb202 100644 --- a/include/instant.h +++ b/include/instant.h @@ -14,6 +14,7 @@ //include //extern cafeConduit_set cs; +#include template class Instant { @@ -27,7 +28,7 @@ private: Transpose renderLong; // 5 Transpose renderDouble; // 6 - CAFEStatus cafeStatus; + CAFEStatus cafeStatus; Granules cafeGranules; PolicyHelper policyHelper; diff --git a/include/makefile b/include/makefile index 409514d..032055b 100644 --- a/include/makefile +++ b/include/makefile @@ -1,7 +1,7 @@ -# makefile.in generated by automake 1.13.4 from makefile.am. +# makefile.in generated by automake 1.16.1 from makefile.am. # include/makefile. Generated from makefile.in by configure. -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -76,8 +86,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu #am__append_1 = zbsread.h zbsHash.h zbsdtHelper.h zbsDataHolders.h \ # bitshuffle/bitshuffle_core.h bitshuffle/bitshuffle.h bitshuffle/iochain.h \ # bitshuffle/bitshuffle_internals.h @@ -86,11 +96,9 @@ host_triplet = x86_64-unknown-linux-gnu #if HAVE_PYTHON_ #include_HEADERS += PyCafe_api.h #endif -#am__append_2 = PyCafe.h -am__append_3 = PyCafe_api.h +am__append_2 = PyCafe.h +#am__append_3 = PyCafe_api.h subdir = include -DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/makefile.am \ - $(am__include_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -98,6 +106,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(am__include_HEADERS_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/./include/config.h CONFIG_CLEAN_FILES = @@ -185,25 +195,26 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13 +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.16 AMTAR = $${TAR-tar} -AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml +AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include AM_DEFAULT_VERBOSITY = 1 -AM_LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib +AM_LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib AR = ar AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader -AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13 +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.16 AWK = gawk CAFE_CPPFLAGS = -I$(top_srcdir)/include -CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 -CPP = /opt/psi/Programming/gcc/7.3.0/bin/gcc -E -CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -CXX = /opt/psi/Programming/gcc/7.3.0/bin/g++ -CXXCPP = /opt/psi/Programming/gcc/7.3.0/bin/g++ -E +CPP = /opt/psi/Programming/gcc/7.5.0/bin/gcc -E +CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include +CXX = /opt/psi/Programming/gcc/7.5.0/bin/g++ +CXXCPP = /opt/psi/Programming/gcc/7.5.0/bin/g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo @@ -225,9 +236,9 @@ INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib +LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib LIBOBJS = -LIBS = -lQt5Xml -lQt5Core +LIBS = -lpython3.10 LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -245,23 +256,23 @@ OTOOL64 = PACKAGE = cafe PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch PACKAGE_NAME = CAFE -PACKAGE_STRING = CAFE 1.19.1 +PACKAGE_STRING = CAFE 1.19.3 PACKAGE_TARNAME = cafe PACKAGE_URL = -PACKAGE_VERSION = 1.19.1 +PACKAGE_VERSION = 1.19.3 PATH_SEPARATOR = : RANLIB = ranlib SED = /usr/bin/sed SET_MAKE = SHELL = /bin/sh STRIP = strip -VERSION = 1.19.1 +VERSION = 1.19.3 abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp ac_ct_AR = ar -ac_ct_CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +ac_ct_CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc ac_ct_CXX = ac_ct_DUMPBIN = am__include = include @@ -270,27 +281,27 @@ am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu +build = x86_64-pc-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu -build_vendor = unknown +build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu +host = x86_64-pc-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu -host_vendor = unknown +host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh -libdir = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64 +libdir = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64 libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var @@ -298,7 +309,7 @@ mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} -prefix = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0 +prefix = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0 program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin @@ -337,14 +348,13 @@ $(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -435,7 +445,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -584,6 +597,8 @@ uninstall-am: uninstall-includeHEADERS ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS +.PRECIOUS: makefile + # 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. diff --git a/libtool b/libtool index dabf793..98005cb 100755 --- a/libtool +++ b/libtool @@ -1,6 +1,6 @@ #! /bin/sh -# Generated automatically by config.status (cafe) 1.19.1 -# Libtool was configured on host gfa-lc7.psi.ch: +# Generated automatically by config.status (cafe) 1.19.3 +# Libtool was configured on host sf-lc8.psi.ch: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -67,12 +67,12 @@ PATH_SEPARATOR=":" # The host system. host_alias= -host=x86_64-unknown-linux-gnu +host=x86_64-pc-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=x86_64-unknown-linux-gnu +build=x86_64-pc-linux-gnu build_os=linux-gnu # A sed program that does not truncate output. @@ -162,7 +162,7 @@ old_postuninstall_cmds="" lock_old_archive_extraction=no # A C compiler. -LTCC="/opt/psi/Programming/gcc/7.3.0/bin/gcc" +LTCC="/opt/psi/Programming/gcc/7.5.0/bin/gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" @@ -282,10 +282,10 @@ finish_eval="" hardcode_into_libs=yes # Compile-time system search path for libraries. -sys_lib_search_path_spec="/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib/gcc /opt/psi/Programming/gcc/7.3.0/lib64 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib64 /lib64 /usr/lib64 /opt/psi/Programming/gcc/7.3.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/lib /lib /usr/lib " +sys_lib_search_path_spec="/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib/gcc/x86_64-pc-linux-gnu/7.5.0 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib/gcc /opt/psi/Programming/gcc/7.5.0/lib64 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib64 /lib64 /usr/lib64 /opt/psi/Programming/gcc/7.5.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/lib /lib /usr/lib " # Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64/atlas /usr/lib64//bind9-export/ /opt/rh/devtoolset-6/root/usr/lib64/dyninst /usr/lib64/dyninst /usr/lib64/llvm /usr/lib64/mysql /usr/lib/oracle/12.2/client64/lib /usr/lib64/tcl8.5/tclx8.4 /usr/lib64/tcl8.5 /usr/lib64/wine/ " +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/dyninst /usr/lib/oracle/19.18/client64/lib /usr/lib64/tclx8.6 /usr/lib64/wine/ " # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path="" @@ -315,7 +315,7 @@ reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" # A language specific compiler. -CC="/opt/psi/Programming/gcc/7.3.0/bin/gcc" +CC="/opt/psi/Programming/gcc/7.5.0/bin/gcc" # Is the compiler the GNU compiler? with_gcc=yes @@ -7732,11 +7732,6 @@ func_mode_link () arg=$func_stripname_result ;; - -Wl,--as-needed) - deplibs="$deplibs $arg" - continue - ;; - -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result @@ -7789,10 +7784,12 @@ func_mode_link () # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -8041,7 +8038,6 @@ func_mode_link () case $linkmode in lib) - as_needed_flag= passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in @@ -8053,7 +8049,6 @@ func_mode_link () done ;; prog) - as_needed_flag= compile_deplibs= finalize_deplibs= alldeplibs=false @@ -8123,15 +8118,6 @@ func_mode_link () lib= found=false case $deplib in - -Wl,--as-needed) - if test prog,link = "$linkmode,$pass" || - test lib,link = "$linkmode,$pass"; then - as_needed_flag="$deplib " - else - deplibs="$deplib $deplibs" - fi - continue - ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then @@ -10549,13 +10535,6 @@ EOF test "X$libobjs" = "X " && libobjs= fi - # A bit hacky. I had wanted to add \$as_needed_flag to archive_cmds instead, but that - # comes from libtool.m4 which is part of the project being built. This should put it - # in the right place though. - if test lib,link = "$linkmode,$pass" && test -n "$as_needed_flag"; then - libobjs=$as_needed_flag$libobjs - fi - save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl @@ -10788,8 +10767,8 @@ EOF compile_deplibs=$new_libs - func_append compile_command " $as_needed_flag $compile_deplibs" - func_append finalize_command " $as_needed_flag $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -11694,7 +11673,7 @@ reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" # A language specific compiler. -CC="/opt/psi/Programming/gcc/7.3.0/bin/g++" +CC="/opt/psi/Programming/gcc/7.5.0/bin/g++" # Is the compiler the GNU compiler? with_gcc=yes @@ -11815,17 +11794,17 @@ file_list_spec="" hardcode_action=immediate # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc /opt/psi/Programming/gcc/7.3.0/lib64/../lib64 /opt/psi/Programming/gcc/7.3.0/lib/../lib64 /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /opt/psi/Programming/gcc/7.3.0/lib64 /opt/psi/Programming/gcc/7.3.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../.." +compiler_lib_search_dirs="/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc /opt/psi/Programming/gcc/7.5.0/lib64/../lib64 /opt/psi/Programming/gcc/7.5.0/lib/../lib64 /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /opt/psi/Programming/gcc/7.5.0/lib64 /opt/psi/Programming/gcc/7.5.0/lib /opt/psi/Tools/HDFView/3.1.2/lib /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../.." # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/lib/../lib64/crti.o /afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtbeginS.o" -postdep_objects="/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtendS.o /lib/../lib64/crtn.o" +predep_objects="/lib/../lib64/crti.o /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/crtbeginS.o" +postdep_objects="/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/crtendS.o /lib/../lib64/crtn.o" predeps="" postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc -L/opt/psi/Programming/gcc/7.3.0/lib64/../lib64 -L/opt/psi/Programming/gcc/7.3.0/lib/../lib64 -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/psi/Programming/gcc/7.3.0/lib64 -L/opt/psi/Programming/gcc/7.3.0/lib -L/opt/psi/Tools/HDFView/3.1.2/lib -L/afs/psi.ch/sys/psi.ra/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../.." +compiler_lib_search_path="-L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0 -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc -L/opt/psi/Programming/gcc/7.5.0/lib64/../lib64 -L/opt/psi/Programming/gcc/7.5.0/lib/../lib64 -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/psi/Programming/gcc/7.5.0/lib64 -L/opt/psi/Programming/gcc/7.5.0/lib -L/opt/psi/Tools/HDFView/3.1.2/lib -L/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.5.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../.." # ### END LIBTOOL TAG CONFIG: CXX diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a3bc337..a644432 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2867,6 +2867,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2875,7 +2878,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on diff --git a/makefile b/makefile index 252efd4..3a7304b 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ -# makefile.in generated by automake 1.13.4 from makefile.am. +# makefile.in generated by automake 1.16.1 from makefile.am. # makefile. Generated from makefile.in by configure. -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -76,20 +86,9 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu subdir = . -DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ - $(srcdir)/makefile.in $(srcdir)/makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(top_srcdir)/./include/config.in $(include_HEADERS) \ - .//AUTHORS COPYING .//COPYING .//ChangeLog .//INSTALL .//NEWS \ - .//README config.guess .//config.guess config.sub \ - .//config.sub depcomp .//depcomp install-sh .//install-sh \ - missing .//missing ltmain.sh .//ltmain.sh \ - $(top_srcdir)/./config.guess $(top_srcdir)/./config.sub \ - $(top_srcdir)/./install-sh $(top_srcdir)/./ltmain.sh \ - $(top_srcdir)/./missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -97,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -166,7 +167,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -188,6 +189,15 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/makefile.in $(top_srcdir)/./compile \ + $(top_srcdir)/./config.guess $(top_srcdir)/./config.sub \ + $(top_srcdir)/./include/config.in $(top_srcdir)/./install-sh \ + $(top_srcdir)/./ltmain.sh $(top_srcdir)/./missing .//AUTHORS \ + .//COPYING .//ChangeLog .//INSTALL .//NEWS .//README \ + .//compile .//config.guess .//config.sub .//install-sh \ + .//ltmain.sh .//missing AUTHORS COPYING ChangeLog INSTALL NEWS \ + README compile config.guess config.sub install-sh ltmain.sh \ + missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -230,24 +240,24 @@ distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13 +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.16 AMTAR = $${TAR-tar} -AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -I$(top_srcdir)/include +AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include -I$(top_srcdir)/include AM_DEFAULT_VERBOSITY = 1 -AM_LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib @CAFE_LIBS@ +AM_LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib @CAFE_LIBS@ AR = ar AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader -AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13 +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.16 AWK = gawk CAFE_CPPFLAGS = -I$(top_srcdir)/include -CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 -CPP = /opt/psi/Programming/gcc/7.3.0/bin/gcc -E -CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -CXX = /opt/psi/Programming/gcc/7.3.0/bin/g++ -CXXCPP = /opt/psi/Programming/gcc/7.3.0/bin/g++ -E +CPP = /opt/psi/Programming/gcc/7.5.0/bin/gcc -E +CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include +CXX = /opt/psi/Programming/gcc/7.5.0/bin/g++ +CXXCPP = /opt/psi/Programming/gcc/7.5.0/bin/g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo @@ -269,9 +279,9 @@ INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib +LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib LIBOBJS = -LIBS = -lQt5Xml -lQt5Core +LIBS = -lpython3.10 LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -289,23 +299,23 @@ OTOOL64 = PACKAGE = cafe PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch PACKAGE_NAME = CAFE -PACKAGE_STRING = CAFE 1.19.1 +PACKAGE_STRING = CAFE 1.19.3 PACKAGE_TARNAME = cafe PACKAGE_URL = -PACKAGE_VERSION = 1.19.1 +PACKAGE_VERSION = 1.19.3 PATH_SEPARATOR = : RANLIB = ranlib SED = /usr/bin/sed SET_MAKE = SHELL = /bin/sh STRIP = strip -VERSION = 1.19.1 +VERSION = 1.19.3 abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp ac_ct_AR = ar -ac_ct_CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +ac_ct_CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc ac_ct_CXX = ac_ct_DUMPBIN = am__include = include @@ -314,27 +324,27 @@ am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu +build = x86_64-pc-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu -build_vendor = unknown +build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu +host = x86_64-pc-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu -host_vendor = unknown +host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh -libdir = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64 +libdir = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64 libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var @@ -342,7 +352,7 @@ mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} -prefix = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0 +prefix = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0 program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin @@ -374,15 +384,14 @@ $(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu makefile -.PRECIOUS: makefile makefile: $(srcdir)/makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -395,8 +404,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): ./include/config.h: ./include/stamp-h1 - @if test ! -f $@; then rm -f ./include/stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) ./include/stamp-h1; else :; fi + @test -f $@ || rm -f ./include/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) ./include/stamp-h1 ./include/stamp-h1: $(top_srcdir)/./include/config.in $(top_builddir)/config.status @rm -f ./include/stamp-h1 @@ -545,7 +554,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -610,7 +622,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -626,11 +638,17 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -648,7 +666,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -658,22 +676,23 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -853,6 +872,8 @@ uninstall-am: uninstall-includeHEADERS mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS +.PRECIOUS: makefile + # 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. diff --git a/src/PyCafe37.cpp b/src/PyCafe37.cpp new file mode 100644 index 0000000..eda2183 --- /dev/null +++ b/src/PyCafe37.cpp @@ -0,0 +1,168553 @@ +/* Generated by Cython 0.29.2 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost/multi_index_container.hpp", + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost/smart_ptr/shared_ptr.hpp", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/PVCtrlHolder.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/PVDataHolder.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/PVGroup.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/cafe.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/cafeDataType.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/cafeEnum.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/caopCodes.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/channelRegalia.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/defines.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/exceptions.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/handleHelper.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/policies.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/policyHelper.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/statusCodes.h", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include/tmDateMap.h", + "/opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h", + "/opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/numpy/core/include/numpy/ufuncobject.h", + "/opt/gfa/python-3.7/latest/include/python3.7m/Python.h", + "/opt/gfa/python-3.7/latest/include/python3.7m/pythread.h", + "/usr/local/epics/base-7.0.6/include/cadef.h", + "/usr/local/epics/base-7.0.6/include/caerr.h", + "/usr/local/epics/base-7.0.6/include/caeventmask.h", + "/usr/local/epics/base-7.0.6/include/db_access.h", + "/usr/local/epics/base-7.0.6/include/epicsMutex.h", + "/usr/local/epics/base-7.0.6/include/epicsTime.h" + ], + "include_dirs": [ + "/opt/gfa/python-3.7/latest/include/python3.7m", + "/usr/local/epics/base-7.0.6/include", + "/usr/local/epics/base-7.0.6/include/os/Linux", + "/usr/local/epics/base-7.0.6/include/compiler/gcc", + "/opt/gfa/cafe/boost/boost_1_61_0/include", + "/opt/gfa/cafe/boost/boost_1_61_0/include/boost", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/include", + ".", + "/opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/numpy/core/include" + ], + "language": "c++", + "libraries": [ + "ca", + "Com", + "dl", + "cafe" + ], + "library_dirs": [ + "/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/lib/RHEL7-x86_64", + "/opt/psi/Programming/gcc/7.3.0/lib64", + "/opt/psi/Programming/gcc/7.3.0/lib", + "/opt/gfa/python-3.7/latest/lib" + ], + "name": "PyCafe", + "runtime_library_dirs": [ + "/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64", + "/opt/gfa/cafe/cpp/cafe-1.19.3-py37-gcc-7.3.0/lib/RHEL7-x86_64", + "/opt/psi/Programming/gcc/7.3.0/lib64", + "/opt/psi/Programming/gcc/7.3.0/lib" + ], + "sources": [ + "PyCafe.pyx" + ] + }, + "module_name": "PyCafe" +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 +#define CYTHON_FUTURE_DIVISION 1 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(U other) { return *ptr == other; } + template bool operator !=(U other) { return *ptr != other; } + private: + T *ptr; +}; + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; // PyThread_create_key reports success always +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif // TSS (Thread Specific Storage) API +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +#define __PYX_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__PyCafe +#define __PYX_HAVE_API__PyCafe +/* Early includes */ +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include +#include +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" +#include "boost/multi_index_container.hpp" +#include "boost/smart_ptr/shared_ptr.hpp" +#include "epicsMutex.h" +#include "cadef.h" +#include "defines.h" +#include "caeventmask.h" +#include "time.h" +#include "epicsTime.h" +#include "db_access.h" +#include "caerr.h" +#include "caopCodes.h" +#include "tmDateMap.h" +#include "cafeDataType.h" +#include "cafeEnum.h" +#include "exceptions.h" +#include "channelRegalia.h" +#include "handleHelper.h" +#include "policies.h" +#include "policyHelper.h" +#include "statusCodes.h" +#include "PVDataHolder.h" +#include "PVCtrlHolder.h" +#include "PVGroup.h" +#include "cafe.h" +#include "pythread.h" +#include +#include "pystate.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 1 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING "ascii" +#define __Pyx_PyObject_FromString __Pyx_PyStr_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyStr_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "PyCafe.pyx", + "stringsource", + "PyCafeDefs.pxi", + "PyCafeDefs_pub.pxi", + "__init__.pxd", + "array.pxd", + "type.pxd", + "bool.pxd", + "complex.pxd", +}; +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* MemviewSliceStruct.proto */ +struct __pyx_memoryview_obj; +typedef struct { + struct __pyx_memoryview_obj *memview; + char *data; + Py_ssize_t shape[8]; + Py_ssize_t strides[8]; + Py_ssize_t suboffsets[8]; +} __Pyx_memviewslice; +#define __Pyx_MemoryView_Len(m) (m.shape[0]) + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __pyx_atomic_int_type int +#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\ + !defined(__i386__) + #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0 + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type LONG + #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 + #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using Intel atomics" + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +typedef volatile __pyx_atomic_int_type __pyx_atomic_int; +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ +#ifndef _ARRAYARRAY_H +struct arrayobject; +typedef struct arrayobject arrayobject; +#endif +struct __pyx_obj_6PyCafe_MemoryNanny; +struct __pyx_obj_6PyCafe_CyCa; +struct __pyx_obj_6PyCafe_channelInfo; +struct __pyx_obj_6PyCafe_pvctrl; +struct __pyx_obj_6PyCafe_CafeException; +struct __pyx_obj_6PyCafe_monitorpolicy; +struct __pyx_obj_6PyCafe_pvdata; +struct __pyx_obj_6PyCafe_pvgroup; +struct __pyx_obj_6PyCafe_CyCafe; +struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv; +struct __pyx_array_obj; +struct __pyx_MemviewEnum_obj; +struct __pyx_memoryview_obj; +struct __pyx_memoryviewslice_obj; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; +struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct; +struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct; +struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException; + +/* "PyCafeDefs.pxi":1202 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ +struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafeDefs.pxi":1327 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ +struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafe.pyx":370 + * + * cdef prepareCafeException( + * self, int status, str _METHOD, # <<<<<<<<<<<<<< + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: + */ +struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException { + int __pyx_n; + unsigned int handle; + PyObject *pv_name; +}; + +/* "PyCafe.pyx":59 + * + * + * cdef class MemoryNanny: # <<<<<<<<<<<<<< + * cdef void* ptr # set to NULL by "constructor" + * def __dealloc__(self): + */ +struct __pyx_obj_6PyCafe_MemoryNanny { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_MemoryNanny *__pyx_vtab; + void *ptr; +}; + + +/* "PyCafeDefs.pxi":35 + * ''' + * + * cdef class CyCa: # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBE_VALUE + * cdef readonly unsigned int CY_DBE_LOG + */ +struct __pyx_obj_6PyCafe_CyCa { + PyObject_HEAD + unsigned int CY_DBE_VALUE; + unsigned int CY_DBE_LOG; + unsigned int CY_DBE_ARCHIVE; + unsigned int CY_DBE_ALARM; + unsigned int CY_DBE_PROPERTY; + unsigned int CY_DBR_PRIMITIVE; + unsigned int CY_DBR_PLAIN; + unsigned int CY_DBR_STS; + unsigned int CY_DBR_TIME; + unsigned int CY_DBR_GR; + unsigned int CY_DBR_CTRL; + unsigned int CY_DBR_PUT; + unsigned int CY_DBR_STSACK; + unsigned int CY_DBR_CLASS; + unsigned int CY_DBR_NONE; + unsigned int CY_DBR_STRING; + unsigned int CY_DBR_SHORT; + unsigned int CY_DBR_INT; + unsigned int CY_DBR_FLOAT; + unsigned int CY_DBR_ENUM; + unsigned int CY_DBR_CHAR; + unsigned int CY_DBR_LONG; + unsigned int CY_DBR_DOUBLE; + unsigned int CY_DBR_STS_STRING; + unsigned int CY_DBR_STS_SHORT; + unsigned int CY_DBR_STS_INT; + unsigned int CY_DBR_STS_FLOAT; + unsigned int CY_DBR_STS_ENUM; + unsigned int CY_DBR_STS_CHAR; + unsigned int CY_DBR_STS_LONG; + unsigned int CY_DBR_STS_DOUBLE; + unsigned int CY_DBR_TIME_STRING; + unsigned int CY_DBR_TIME_SHORT; + unsigned int CY_DBR_TIME_INT; + unsigned int CY_DBR_TIME_FLOAT; + unsigned int CY_DBR_TIME_ENUM; + unsigned int CY_DBR_TIME_CHAR; + unsigned int CY_DBR_TIME_LONG; + unsigned int CY_DBR_TIME_DOUBLE; + unsigned int CY_DBR_GR_STRING; + unsigned int CY_DBR_GR_SHORT; + unsigned int CY_DBR_GR_INT; + unsigned int CY_DBR_GR_FLOAT; + unsigned int CY_DBR_GR_ENUM; + unsigned int CY_DBR_GR_CHAR; + unsigned int CY_DBR_GR_LONG; + unsigned int CY_DBR_GR_DOUBLE; + unsigned int CY_DBR_CTRL_STRING; + unsigned int CY_DBR_CTRL_SHORT; + unsigned int CY_DBR_CTRL_INT; + unsigned int CY_DBR_CTRL_FLOAT; + unsigned int CY_DBR_CTRL_ENUM; + unsigned int CY_DBR_CTRL_CHAR; + unsigned int CY_DBR_CTRL_LONG; + unsigned int CY_DBR_CTRL_DOUBLE; + int CY_ECA_NORMAL; + int CY_ECA_ALLOCMEM; + int CY_ECA_TOLARGE; + int CY_ECA_TIMEOUT; + int CY_ECA_BADTYPE; + int CY_ECA_INTERNAL; + int CY_ECA_GETFAIL; + int CY_ECA_PUTFAIL; + int CY_ECA_BADCOUNT; + int CY_ECA_BADSTR; + int CY_ECA_DISCONN; + int CY_ECA_DBLCHNL; + int CY_ECA_EVDISALLOW; + int CY_ECA_BADMONID; + int CY_ECA_BADMASK; + int CY_ECA_IODONE; + int CY_ECA_IOINPROGRESS; + int CY_ECA_BADSYNCGRP; + int CY_ECA_PUTCBINPROG; + int CY_ECA_NORDACCESS; + int CY_ECA_NOWTACCESS; + int CY_ECA_ANACHRONISM; + int CY_ECA_NOSEARCHADDR; + int CY_ECA_NOCONVERT; + int CY_ECA_BADCHID; + int CY_ECA_BADFUNCPTR; + int CY_ECA_ISATTACHED; + int CY_ECA_UNAVAILINSERV; + int CY_ECA_CHANDESTROY; + int CY_ECA_BADPRIORITY; + int CY_ECA_NOTTHREADED; + int CY_ECA_16KARRAYCLIENT; + int CY_ECA_CONNSEQTMO; + int CY_ECA_UNRESPTMO; + int ICAFE_CS_NEVER_CONN; + int ICAFE_CS_PREV_CONN; + int ICAFE_CS_CONN; + int ICAFE_CS_CLOSED; + int ICAFE_CS_DISCONN; + int ICAFE_CS_UNKNOWN; + int ICAFE_TYPENOTCONN; + int ICAFE_RULE_FALSE; + int ICAFE_BADCOUNT; + int ICAFE_CALLBACK_NOT_YET_INVOKED; + int ICAFE_WAITING_FOR_PREV_CALLBACK; + int ICAFE_CACHE_EMPTY; + int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + int ICAFE_SET_AND_GET_MISMATCH; + int ICAFE_CA_OP_GET; + int ICAFE_CA_OP_PUT; + int ICAFE_CA_OP_CREATE_CHANNEL; + int ICAFE_CA_OP_ADD_EVENT; + int ICAFE_CA_OP_CLEAR_EVENT; + int ICAFE_CA_OP_OTHER; + int ICAFE_CA_OP_CONN_DOWN; + int ICAFE_CA_OP_CONN_UP; + int ICAFE_DAQ_RUN; + int ICAFE_DAQ_PAUSED; + int ICAFE_DAQ_STOPPED; + int ECAFE_LOAD_COLLECTION; + int ECAFE_LOAD_GROUP; + int ICAFE_NORMAL; + int ICAFE_SUCCESS; + int ECAFE_NODATA; + int ECAFE_INVALID_TYPE; + int ECAFE_BADCOUNT; + int ECAFE_BADSTR; + int ECAFE_BADTYPE; + int ECAFE_NO_CONVERT; + int ECAFE_NULLCONTEXT; + int ECAFE_NULLCHID; + int ECAFE_NULLEVID; + int ECAFE_UNKNOWN_COLLECTION; + int ECAFE_EMPTY_COLLECTION; + int ECAFE_COLLECTION_PREV_DEF; + int ECAFE_COLLECTION_INVALID_MEMBER; + int ECAFE_RULE_FALSE; + int ECAFE_UNKNOWN_GROUP; + int ECAFE_EMPTY_GROUP; + int ECAFE_GROUP_PREV_DEF; + int ECAFE_INVALID_HANDLE; + int ECAFE_INVALID_GROUP_HANDLE; + int ECAFE_NORDACCESS; + int ECAFE_NOWTACCESS; + int ECAFE_TIMEOUT; + int ECAFE_CANNOT_OPEN_FILE; + int ECAFE_INVALID_SWITCH_CASE; + int ECAFE_PVALIAS_PREV_DEF; + int ECAFE_PVALIAS_INVALID; + int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS; + int ECAFE_DEVICE_ATTRIB_NOT_FOUND; + int ECAFE_HASH_UNIQUEID_EXISTS; + int ECAFE_WRONG_CA_CONTEXT; + int ECAFE_INVALID_CAFENUM_POLICY_TYPE; + int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + int ECAFE_INVALID_ENUM_INDEX; + int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + int ECAFE_TIMEOUT_SET_AND_MATCH; + int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + int ECAFE_INCONSISTENT_CONTAINER_CORRECTED; + int ECAFE_BPM_DATA_IS_INVALID; + int ECAFE_BITSHUFF_DECOMPRESS; + int ECAFE_BITSHUFF_ALLOCMEM; + int ECAFE_BITSHUFF_REALLOCMEM; + int ECAFE_BITSHUFF_BADCOUNT; + int ECAFE_BSREAD_MULTIPART_MESS_NODATA; + int ECAFE_BSREAD_PARSEFAIL_MAINHEADER; + int ECAFE_BSREAD_PARSEFAIL_DATAHEADER; + int ECAFE_BSREAD_ZMQSTREAM_NULL; + int ERRNO_EINTR; + int ERRNO_EAGAIN; + int ERRNO_EFAULT; + int ERRNO_EINVAL; + int ERRNO_ENOTSOCK; + int ERRNO_EPROTONOSUPPORT; + int SEV_NO_ALARM; + int SEV_MINOR; + int SEV_MAJOR; + int SEV_INVALID; + int STAT_NO_ALARM; + int STAT_READ; + int STAT_WRITE; + int STAT_HIHI; + int STAT_HIGH; + int STAT_LOLO; + int STAT_LOW; + int STAT_STATE; + int STAT_COS; + int STAT_COMM; + int STAT_TIMEOUT; + int STAT_HWLIMIT; + int STAT_CALC; + int STAT_SCAN; + int STAT_LINK; + int STAT_SOFT; + int STAT_BAD_SUB; + int STAT_UDF; + int STAT_DISABLE; + int STAT_SIMM; + int STAT_READ_ACCESS; + int STAT_WRITE_ACCESS; + unsigned int WITHOUT_CALLBACK; + unsigned int WITH_CALLBACK_DEFAULT; + unsigned int WITH_CALLBACK_USER_SUPPLIED; + unsigned int WITH_FLUSH_IO; + unsigned int WITH_PEND_IO; + unsigned int WITH_PEND_EVENT; + unsigned int WITH_POLL; + unsigned int FLUSH_AUTOMATIC; + unsigned int FLUSH_NOW; + unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION; + unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION; + unsigned int FLUSH_AFTER_EACH_MESSAGE; + unsigned int FLUSH_AFTER_EACH_GROUP_CREATION; + unsigned int FLUSH_DESIGNATED_TO_CLIENT; + unsigned int GET_CACHE_NO_CHECK; + unsigned int GET_CACHE_NO_WAIT; + unsigned int GET_CACHE_NOW; + unsigned int GET_CACHE_WAIT; + unsigned int GET_FROM_CACHE; + unsigned int GET_FROM_IOC; + unsigned int NATIVE_DATATYPE; + unsigned int LOWEST_DATATYPE; + unsigned int BLOCKING; + unsigned int WAIT; + unsigned int NON_BLOCKING; + unsigned int NO_WAIT; + unsigned int NO_MESSAGE; + unsigned int PRE_REQUEST; + unsigned int FROM_REQUEST; + unsigned int FROM_PEND; + unsigned int FROM_CALLBACK; + unsigned int FROM_MESSAGE; + unsigned int NOT_INITIATED; + unsigned int PENDING; + unsigned int COMPLETE; + double DEFAULT_TIMEOUT_PEND_EVENT; + double DEFAULT_TIMEOUT_PEND_IO; + std::string INVALID_ENUM_RETURN_STRING; + short INVALID_ENUM_RETURN_VALUE; + unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK; + short BSREAD_ZEROMQ_TIMEOUT_MS; +}; + + +/* "PyCafeDefs.pxi":662 + * + * + * cdef class channelInfo: # <<<<<<<<<<<<<< + * cdef readonly long channelID + * cdef readonly bint connectFlag + */ +struct __pyx_obj_6PyCafe_channelInfo { + PyObject_HEAD + long channelID; + int connectFlag; + std::string hostName; + unsigned int nelem; + int dataType; + std::string dataTypeAsString; + unsigned short accessRead; + unsigned short accessWrite; + std::string className; + int connectionState; + int cafeConnectionState; + std::string connectionStateAsString; + std::string cafeConnectionStateAsString; + CAFEDataTypeCode cdt; + CAFEStatusCode csc; + CAOPCodes caop; +}; + + +/* "PyCafeDefs.pxi":752 + * + * ################################################################################## + * cdef class pvctrl: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ +struct __pyx_obj_6PyCafe_pvctrl { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvctrl *__pyx_vtab; + unsigned int nelem; + int alarmStatus; + int alarmSeverity; + unsigned short precision; + PyObject *units; + unsigned short noEnumStrings; + PyObject *enumStrings; + PyObject *upperDisplayLimit; + PyObject *lowerDisplayLimit; + PyObject *upperAlarmLimit; + PyObject *upperWarningLimit; + PyObject *lowerWarningLimit; + PyObject *lowerAlarmLimit; + PyObject *upperControlLimit; + PyObject *lowerControlLimit; + PyObject *value; + int status; +}; + + +/* "PyCafeDefs.pxi":846 + * ################################################################################## + * + * cdef class CafeException(Exception): # <<<<<<<<<<<<<< + * cdef readonly str type + * cdef readonly str source + */ +struct __pyx_obj_6PyCafe_CafeException { + PyBaseExceptionObject __pyx_base; + PyObject *type; + PyObject *source; + unsigned int handle; + PyObject *name; + int error_code; + PyObject *error_text; + PyObject *error_info; +}; + + +/* "PyCafeDefs.pxi":908 + * + * + * cdef class monitorpolicy: # <<<<<<<<<<<<<< + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType + */ +struct __pyx_obj_6PyCafe_monitorpolicy { + PyObject_HEAD + chtype dataType; + chtype dbrDataType; + DBR_TYPE cafeDbrType; + unsigned int nelem; + unsigned int mask; + unsigned int userArgs; + int status; + unsigned int monid; + int maskHasDBE_PROPERTY; + int maskHasDBE_VALUE; + int maskHasDBE_LOG; + int maskHasDBE_ALARM; +}; + + +/* "PyCafeDefs.pxi":955 + * + * ################################################################################## + * cdef class pvdata: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ +struct __pyx_obj_6PyCafe_pvdata { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvdata *__pyx_vtab; + unsigned int nelem; + int alarmStatus; + int alarmSeverity; + PyObject *alarmStatusAsString; + PyObject *alarmSeverityAsString; + PyObject *ts; + PyObject *tsDate; + PyObject *tsDateAsString; + PyObject *bsDateAsString; + PyObject *value; + int status; + PyObject *statusAsString; + unsigned PY_LONG_LONG pulseID; + int dataType; + PyObject *dataTypeAsString; +}; + + +/* "PyCafeDefs.pxi":1044 + * + * ################################################################################## + * cdef class pvgroup: # <<<<<<<<<<<<<< + * cdef public list pvdata + * cdef public unsigned int npv + */ +struct __pyx_obj_6PyCafe_pvgroup { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_pvgroup *__pyx_vtab; + PyObject *pvdata; + unsigned int npv; + std::string name; + int groupStatus; + unsigned int groupHandle; + int rule; + int hasAlarm; + int hasTS; +}; + + +/* "PyCafe.pyx":173 + * + * ################################################################################ + * cdef class CyCafe: # <<<<<<<<<<<<<< + * """ + * Class with associated process variable meta data. + */ +struct __pyx_obj_6PyCafe_CyCafe { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_CyCafe *__pyx_vtab; + CAFE *_c_cafe; + double valFloat; + dbr_long_t valInt; + std::string valStr; + std::vector vFloat; + std::vector vInt; + std::vector vStr; + PyObject *_exception_text; + int _enable_exceptions; + double _min_timeout; + CAFEStatus cs; + CAFEStatusSeverity css; + HandleHelper hh; + PolicyHelper ph; + ChannelRegalia channelInfo; +}; + + +/* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ +struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv { + PyObject_HEAD + PyObject *__pyx_v_func; +}; + + +/* "View.MemoryView":105 + * + * @cname("__pyx_array") + * cdef class array: # <<<<<<<<<<<<<< + * + * cdef: + */ +struct __pyx_array_obj { + PyObject_HEAD + struct __pyx_vtabstruct_array *__pyx_vtab; + char *data; + Py_ssize_t len; + char *format; + int ndim; + Py_ssize_t *_shape; + Py_ssize_t *_strides; + Py_ssize_t itemsize; + PyObject *mode; + PyObject *_format; + void (*callback_free_data)(void *); + int free_data; + int dtype_is_object; +}; + + +/* "View.MemoryView":279 + * + * @cname('__pyx_MemviewEnum') + * cdef class Enum(object): # <<<<<<<<<<<<<< + * cdef object name + * def __init__(self, name): + */ +struct __pyx_MemviewEnum_obj { + PyObject_HEAD + PyObject *name; +}; + + +/* "View.MemoryView":330 + * + * @cname('__pyx_memoryview') + * cdef class memoryview(object): # <<<<<<<<<<<<<< + * + * cdef object obj + */ +struct __pyx_memoryview_obj { + PyObject_HEAD + struct __pyx_vtabstruct_memoryview *__pyx_vtab; + PyObject *obj; + PyObject *_size; + PyObject *_array_interface; + PyThread_type_lock lock; + __pyx_atomic_int acquisition_count[2]; + __pyx_atomic_int *acquisition_count_aligned_p; + Py_buffer view; + int flags; + int dtype_is_object; + __Pyx_TypeInfo *typeinfo; +}; + + +/* "View.MemoryView":961 + * + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< + * "Internal class for passing memoryview slices to Python" + * + */ +struct __pyx_memoryviewslice_obj { + struct __pyx_memoryview_obj __pyx_base; + __Pyx_memviewslice from_slice; + PyObject *from_object; + PyObject *(*to_object_func)(char *); + int (*to_dtype_func)(char *, PyObject *); +}; + + + +/* "View.MemoryView":105 + * + * @cname("__pyx_array") + * cdef class array: # <<<<<<<<<<<<<< + * + * cdef: + */ + +struct __pyx_vtabstruct_array { + PyObject *(*get_memview)(struct __pyx_array_obj *); +}; +static struct __pyx_vtabstruct_array *__pyx_vtabptr_array; + + +/* "PyCafe.pyx":59 + * + * + * cdef class MemoryNanny: # <<<<<<<<<<<<<< + * cdef void* ptr # set to NULL by "constructor" + * def __dealloc__(self): + */ + +struct __pyx_vtabstruct_6PyCafe_MemoryNanny { + PyObject *(*create)(void *); +}; +static struct __pyx_vtabstruct_6PyCafe_MemoryNanny *__pyx_vtabptr_6PyCafe_MemoryNanny; + + +/* "PyCafeDefs.pxi":752 + * + * ################################################################################## + * cdef class pvctrl: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ + +struct __pyx_vtabstruct_6PyCafe_pvctrl { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvctrl *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvctrl *__pyx_vtabptr_6PyCafe_pvctrl; + + +/* "PyCafeDefs.pxi":955 + * + * ################################################################################## + * cdef class pvdata: # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + */ + +struct __pyx_vtabstruct_6PyCafe_pvdata { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvdata *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvdata *__pyx_vtabptr_6PyCafe_pvdata; + + +/* "PyCafeDefs.pxi":1044 + * + * ################################################################################## + * cdef class pvgroup: # <<<<<<<<<<<<<< + * cdef public list pvdata + * cdef public unsigned int npv + */ + +struct __pyx_vtabstruct_6PyCafe_pvgroup { + PyObject *(*showPrint)(struct __pyx_obj_6PyCafe_pvgroup *, PyObject *, PyObject *); +}; +static struct __pyx_vtabstruct_6PyCafe_pvgroup *__pyx_vtabptr_6PyCafe_pvgroup; + + +/* "PyCafe.pyx":173 + * + * ################################################################################ + * cdef class CyCafe: # <<<<<<<<<<<<<< + * """ + * Class with associated process variable meta data. + */ + +struct __pyx_vtabstruct_6PyCafe_CyCafe { + PyObject *(*prepareCafeException)(struct __pyx_obj_6PyCafe_CyCafe *, int, PyObject *, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args); + PyObject *(*getMonitorWhenToFlushSendBuffer)(struct __pyx_obj_6PyCafe_CyCafe *); +}; +static struct __pyx_vtabstruct_6PyCafe_CyCafe *__pyx_vtabptr_6PyCafe_CyCafe; + + +/* "View.MemoryView":330 + * + * @cname('__pyx_memoryview') + * cdef class memoryview(object): # <<<<<<<<<<<<<< + * + * cdef object obj + */ + +struct __pyx_vtabstruct_memoryview { + char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *); + PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *); + PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *); + PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *); +}; +static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview; + + +/* "View.MemoryView":961 + * + * @cname('__pyx_memoryviewslice') + * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<< + * "Internal class for passing memoryview slices to Python" + * + */ + +struct __pyx_vtabstruct__memoryviewslice { + struct __pyx_vtabstruct_memoryview __pyx_base; +}; +static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice; + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); + +/* PyObjectFormatAndDecref.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +/* BuildPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char); + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); + +/* IncludeStringH.proto */ +#include + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetAttr.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* PyObjectFormat.proto */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); +#else +#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* decode_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + return __Pyx_decode_c_bytes( + PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), + start, stop, encoding, errors, decode_func); +} + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); + +/* SliceTupleAndList.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/* CythonFunction.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) +static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* SetItemInt.proto */ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck); + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +/* MemviewSliceInit.proto */ +#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d +#define __Pyx_MEMVIEW_DIRECT 1 +#define __Pyx_MEMVIEW_PTR 2 +#define __Pyx_MEMVIEW_FULL 4 +#define __Pyx_MEMVIEW_CONTIG 8 +#define __Pyx_MEMVIEW_STRIDED 16 +#define __Pyx_MEMVIEW_FOLLOW 32 +#define __Pyx_IS_C_CONTIG 1 +#define __Pyx_IS_F_CONTIG 2 +static int __Pyx_init_memviewslice( + struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference); +static CYTHON_INLINE int __pyx_add_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); +static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); +#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p) +#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview)) +#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) +#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__) +static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int); +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* py_dict_values.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/* CallUnboundCMethod0.proto */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CallUnboundCMethod0(cfunc, self)\ + (likely((cfunc)->func) ?\ + (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ + (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ + (PY_VERSION_HEX >= 0x030700A0 ?\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ + __Pyx__CallUnboundCMethod0(cfunc, self)) +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_keys.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); + +/* py_dict_clear.proto */ +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + +/* PyUnicodeContains.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { + int result = PyUnicode_Contains(text, substring); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* HasAttr.proto */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); + +/* DictGetItem.proto */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* StrEquals.proto */ +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +/* None.proto */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); + +/* UnaryNegOverflows.proto */ +#define UNARY_NEG_WOULD_OVERFLOW(x)\ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) + +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/ +/* decode_c_string.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +/* ListExtend.proto */ +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} + +/* None.proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long); + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/* SetVTable.proto */ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* PatchModuleWithCoroutine.proto */ +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); + +/* PatchInspect.proto */ +static PyObject* __Pyx_patch_inspect(PyObject* module); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +/* MemviewSliceIsContig.proto */ +static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim); + +/* OverlappingSlices.proto */ +static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize); + +/* Capsule.proto */ +static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); + +/* ArrayAPI.proto */ +#ifndef _ARRAYARRAY_H +#define _ARRAYARRAY_H +typedef struct arraydescr { + int typecode; + int itemsize; + PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); + int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); +#if PY_MAJOR_VERSION >= 3 + char *formats; +#endif +} arraydescr; +struct arrayobject { + PyObject_HEAD + Py_ssize_t ob_size; + union { + char *ob_item; + float *as_floats; + double *as_doubles; + int *as_ints; + unsigned int *as_uints; + unsigned char *as_uchars; + signed char *as_schars; + char *as_chars; + unsigned long *as_ulongs; + long *as_longs; +#if PY_MAJOR_VERSION >= 3 + unsigned long long *as_ulonglongs; + long long *as_longlongs; +#endif + short *as_shorts; + unsigned short *as_ushorts; + Py_UNICODE *as_pyunicodes; + void *as_voidptr; + } data; + Py_ssize_t allocated; + struct arraydescr *ob_descr; + PyObject *weakreflist; +#if PY_MAJOR_VERSION >= 3 + int ob_exports; +#endif +}; +#ifndef NO_NEWARRAY_INLINE +static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr) { + arrayobject *op; + size_t nbytes; + if (size < 0) { + PyErr_BadInternalCall(); + return NULL; + } + nbytes = size * descr->itemsize; + if (nbytes / descr->itemsize != (size_t)size) { + return PyErr_NoMemory(); + } + op = (arrayobject *) type->tp_alloc(type, 0); + if (op == NULL) { + return NULL; + } + op->ob_descr = descr; + op->allocated = size; + op->weakreflist = NULL; + op->ob_size = size; + if (size <= 0) { + op->data.ob_item = NULL; + } + else { + op->data.ob_item = PyMem_NEW(char, nbytes); + if (op->data.ob_item == NULL) { + Py_DECREF(op); + return PyErr_NoMemory(); + } + } + return (PyObject *) op; +} +#else +PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr); +#endif +static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + self->ob_size = n; + self->allocated = n; + return 0; +} +static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + Py_ssize_t newsize; + if (n < self->allocated && n*4 > self->allocated) { + self->ob_size = n; + return 0; + } + newsize = n + (n / 2) + 1; + if (newsize <= n) { + PyErr_NoMemory(); + return -1; + } + PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + self->ob_size = n; + self->allocated = newsize; + return 0; +} +#endif + +/* None.proto */ +#include + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(ChannelWhenToFlushSendBufferPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_char_t(dbr_char_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_enum_t(dbr_enum_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int16_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int16_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int8(npy_int8 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int8_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int8_t(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint8_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint8_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int32_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int32_t(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint32_t(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint32_t(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj); + +/* MemviewDtypeToObject.proto */ +static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp); +static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_ERROR_STATE(CAFE_ERROR_STATE value); + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); + +/* MemviewSliceCopyTemplate.proto */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* TypeInfoCompare.proto */ +static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); + +/* MemviewSliceValidateAndInit.proto */ +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *, int writable_flag); + +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *, int writable_flag); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + +static PyObject *__pyx_f_6PyCafe_11MemoryNanny_create(void *__pyx_v_ptr); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6pvctrl_showPrint(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6pvdata_showPrint(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto*/ +static PyObject *__pyx_f_6PyCafe_7pvgroup_showPrint(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_npv, PyObject *__pyx_v_grouplist); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_prepareCafeException(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_status, PyObject *__pyx_v__METHOD, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args); /* proto*/ +static PyObject *__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto*/ +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/ +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/ +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/ +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/ +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libcpp.string' */ + +/* Module declarations from 'libcpp.vector' */ + +/* Module declarations from 'libcpp.utility' */ + +/* Module declarations from 'libcpp.map' */ + +/* Module declarations from 'libcpp.pair' */ + +/* Module declarations from 'cython.view' */ + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython.version' */ + +/* Module declarations from 'cpython.exc' */ + +/* Module declarations from 'cpython.module' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'cpython.tuple' */ + +/* Module declarations from 'cpython.list' */ + +/* Module declarations from 'cpython.sequence' */ + +/* Module declarations from 'cpython.mapping' */ + +/* Module declarations from 'cpython.iterator' */ + +/* Module declarations from 'cpython.number' */ + +/* Module declarations from 'cpython.int' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.bool' */ +static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; + +/* Module declarations from 'cpython.long' */ + +/* Module declarations from 'cpython.float' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.complex' */ +static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; + +/* Module declarations from 'cpython.string' */ + +/* Module declarations from 'cpython.unicode' */ + +/* Module declarations from 'cpython.dict' */ + +/* Module declarations from 'cpython.instance' */ + +/* Module declarations from 'cpython.function' */ + +/* Module declarations from 'cpython.method' */ + +/* Module declarations from 'cpython.weakref' */ + +/* Module declarations from 'cpython.getargs' */ + +/* Module declarations from 'cpython.pythread' */ + +/* Module declarations from 'cpython.pystate' */ + +/* Module declarations from 'cpython.cobject' */ + +/* Module declarations from 'cpython.oldbuffer' */ + +/* Module declarations from 'cpython.set' */ + +/* Module declarations from 'cpython.bytes' */ + +/* Module declarations from 'cpython.pycapsule' */ + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ + +/* Module declarations from 'array' */ + +/* Module declarations from 'cpython.array' */ +static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0; +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'PyCafe' */ +static PyTypeObject *__pyx_ptype_6PyCafe_MemoryNanny = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CyCa = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_channelInfo = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvctrl = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CafeException = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_monitorpolicy = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvdata = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvgroup = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CyCafe = 0; +static PyTypeObject *__pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv = 0; +static PyTypeObject *__pyx_array_type = 0; +static PyTypeObject *__pyx_MemviewEnum_type = 0; +static PyTypeObject *__pyx_memoryview_type = 0; +static PyTypeObject *__pyx_memoryviewslice_type = 0; +static PyObject *__pyx_v_6PyCafe_hmd = 0; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_MED; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_LOW; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_NONE; +static int __pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL; +static PyObject *__pyx_v_6PyCafe_py_cb_handle = 0; +static PyObject *__pyx_v_6PyCafe_py_cb_handle_open = 0; +static PyObject *__pyx_v_6PyCafe_cbobjt = 0; +static PyObject *generic = 0; +static PyObject *strided = 0; +static PyObject *indirect = 0; +static PyObject *contiguous = 0; +static PyObject *indirect_contiguous = 0; +static int __pyx_memoryview_thread_locks_used; +static PyThread_type_lock __pyx_memoryview_thread_locks[8]; +__PYX_EXTERN_C void cy_monitor_handler_wrapper(void *); /*proto*/ +__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder); /*proto*/ +__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder); /*proto*/ +__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string); /*proto*/ +__PYX_EXTERN_C void cy_handle_handler_wrapper(void *, unsigned int); /*proto*/ +__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int); /*proto*/ +__PYX_EXTERN_C void cy_cb_handle_get_wrapper(void *, unsigned int); /*proto*/ +__PYX_EXTERN_C void cy_cb_handle_put_wrapper(void *, unsigned int); /*proto*/ +static PyObject *__pyx_f_6PyCafe_encodeString(PyObject *); /*proto*/ +static PyObject *__pyx_f_6PyCafe_getMatchedDataType(PyObject *, PyObject *); /*proto*/ +static struct __pyx_obj_6PyCafe_pvdata *__pyx_f_6PyCafe_PVDataHolderToStruct(PVDataHolder, struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct *__pyx_optional_args); /*proto*/ +static struct __pyx_obj_6PyCafe_pvctrl *__pyx_f_6PyCafe_PVCtrlHolderToStruct(PVCtrlHolder, struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct *__pyx_optional_args); /*proto*/ +static struct __pyx_obj_6PyCafe_channelInfo *__pyx_f_6PyCafe_channelRegaliaToStruct(ChannelRegalia); /*proto*/ +static PyObject *__pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(struct __pyx_obj_6PyCafe_CafeException *, PyObject *); /*proto*/ +static std::string __pyx_convert_string_from_py_std__in_string(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_unsigned_int(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_pair_to_py_float____std_3a__3a_string(std::pair const &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_float(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_unsigned_short(const std::vector &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_int(PyObject *); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_int(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_dbr_long_t(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_double(const std::vector &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_double(PyObject *); /*proto*/ +static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/ +static void *__pyx_align_pointer(void *, size_t); /*proto*/ +static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/ +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/ +static PyObject *_unellipsify(PyObject *, int); /*proto*/ +static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/ +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/ +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/ +static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/ +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/ +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/ +static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/ +static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/ +static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/ +static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/ +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/ +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/ +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/ +static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/ +static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/ +static int __pyx_memoryview_err(PyObject *, char *); /*proto*/ +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/ +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/ +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/ +static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/ +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t = { "int16_t", NULL, sizeof(__pyx_t_5numpy_int16_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int16_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int16_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int8_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +#define __Pyx_MODULE_NAME "PyCafe" +extern int __pyx_module_is_main_PyCafe; +int __pyx_module_is_main_PyCafe = 0; + +/* Implementation of 'PyCafe' */ +static PyObject *__pyx_builtin_print; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_hex; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_UnicodeDecodeError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_MemoryError; +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_UserWarning; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin_UnicodeEncodeError; +static PyObject *__pyx_builtin_ImportError; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_Ellipsis; +static PyObject *__pyx_builtin_id; +static PyObject *__pyx_builtin_IndexError; +static const char __pyx_k_0[] = "({0})"; +static const char __pyx_k_C[] = "C"; +static const char __pyx_k_O[] = "O"; +static const char __pyx_k_c[] = "c"; +static const char __pyx_k_d[] = "d"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_h[] = "h"; +static const char __pyx_k_s[] = "[%s]"; +static const char __pyx_k_PV[] = "PV ="; +static const char __pyx_k__5[] = ""; +static const char __pyx_k__6[] = " ("; +static const char __pyx_k__7[] = ")"; +static const char __pyx_k_cb[] = "cb"; +static const char __pyx_k_dt[] = "dt"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_mv[] = "mv"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_pv[] = "pv"; +static const char __pyx_k_ts[] = "ts ="; +static const char __pyx_k_EGU[] = ".EGU"; +static const char __pyx_k__12[] = " "; +static const char __pyx_k__17[] = "------------------------------------------------------------------------"; +static const char __pyx_k__25[] = "!!"; +static const char __pyx_k__26[] = "---------------------------------"; +static const char __pyx_k__28[] = "--------------------------------------------"; +static const char __pyx_k__40[] = "{} {} \n{}"; +static const char __pyx_k__41[] = ","; +static const char __pyx_k__42[] = "{} {} {}"; +static const char __pyx_k__43[] = "{} {} \n{} {}"; +static const char __pyx_k__44[] = "{} {} {} {} {} {}"; +static const char __pyx_k__45[] = ":"; +static const char __pyx_k__47[] = "{} {} \n{} {} {} \n{}"; +static const char __pyx_k_art[] = "art"; +static const char __pyx_k_d_2[] = "[%d]"; +static const char __pyx_k_dbr[] = "dbr"; +static const char __pyx_k_end[] = "end"; +static const char __pyx_k_get[] = "get"; +static const char __pyx_k_has[] = "has"; +static const char __pyx_k_hex[] = "hex"; +static const char __pyx_k_int[] = "int"; +static const char __pyx_k_new[] = "__new__"; +static const char __pyx_k_obj[] = "obj"; +static const char __pyx_k_pyx[] = "{} {}.pyx: {} \n{}"; +static const char __pyx_k_set[] = "set"; +static const char __pyx_k_str[] = "str"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_wpk[] = "wpk"; +static const char __pyx_k_zip[] = "zip"; +static const char __pyx_k_CyCa[] = "CyCa"; +static const char __pyx_k_None[] = "None"; +static const char __pyx_k_PV_2[] = "PV="; +static const char __pyx_k_PV_3[] = " PV="; +static const char __pyx_k_PV_4[] = "PV"; +static const char __pyx_k__104[] = "======================================================"; +static const char __pyx_k__108[] = "=============="; +static const char __pyx_k__111[] = "["; +static const char __pyx_k__112[] = "]"; +static const char __pyx_k__130[] = " : "; +static const char __pyx_k__163[] = "."; +static const char __pyx_k_args[] = "args"; +static const char __pyx_k_base[] = "base"; +static const char __pyx_k_bool[] = "bool"; +static const char __pyx_k_byte[] = "byte"; +static const char __pyx_k_cafe[] = "cafe"; +static const char __pyx_k_copy[] = "copy"; +static const char __pyx_k_dict[] = "__dict__"; +static const char __pyx_k_from[] = " from "; +static const char __pyx_k_func[] = "func"; +static const char __pyx_k_init[] = "init"; +static const char __pyx_k_int8[] = "int8"; +static const char __pyx_k_intc[] = "intc"; +static const char __pyx_k_intp[] = "intp"; +static const char __pyx_k_keys[] = "keys"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mask[] = "mask ="; +static const char __pyx_k_mode[] = "mode"; +static const char __pyx_k_mpid[] = "mpid"; +static const char __pyx_k_name[] = "name ="; +static const char __pyx_k_ndim[] = "ndim"; +static const char __pyx_k_open[] = "open"; +static const char __pyx_k_pack[] = "pack"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_step[] = "step"; +static const char __pyx_k_stop[] = "stop"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_time[] = "time"; +static const char __pyx_k_ts_2[] = "ts"; +static const char __pyx_k_type[] = "_type"; +static const char __pyx_k_uint[] = "uint"; +static const char __pyx_k_wait[] = "wait"; +static const char __pyx_k_when[] = "when"; +static const char __pyx_k_wmpk[] = "wmpk"; +static const char __pyx_k_7_0_6[] = "7.0.6"; +static const char __pyx_k_ASCII[] = "ASCII"; +static const char __pyx_k_Array[] = "Array"; +static const char __pyx_k_UTF_8[] = "UTF-8"; +static const char __pyx_k_array[] = "array"; +static const char __pyx_k_bool8[] = "bool8"; +static const char __pyx_k_cName[] = "cName"; +static const char __pyx_k_c_int[] = "c_int"; +static const char __pyx_k_cache[] = "cache"; +static const char __pyx_k_cinit[] = "__cinit__"; +static const char __pyx_k_class[] = "__class__"; +static const char __pyx_k_close[] = "close"; +static const char __pyx_k_cname[] = "cname"; +static const char __pyx_k_ctype[] = "ctype"; +static const char __pyx_k_dtype[] = "dtype"; +static const char __pyx_k_empty[] = "empty"; +static const char __pyx_k_error[] = "error"; +static const char __pyx_k_flags[] = "flags"; +static const char __pyx_k_float[] = "float"; +static const char __pyx_k_force[] = "force"; +static const char __pyx_k_gName[] = "gName"; +static const char __pyx_k_getPV[] = "getPV"; +static const char __pyx_k_gname[] = "gname"; +static const char __pyx_k_index[] = "index"; +static const char __pyx_k_int16[] = "int16"; +static const char __pyx_k_int32[] = "int32"; +static const char __pyx_k_int64[] = "int64"; +static const char __pyx_k_int_2[] = "int_"; +static const char __pyx_k_monid[] = "monid ="; +static const char __pyx_k_nelem[] = "nelem ="; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_order[] = "order"; +static const char __pyx_k_print[] = "print"; +static const char __pyx_k_py_cb[] = "py_cb"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_shape[] = "shape"; +static const char __pyx_k_short[] = "short"; +static const char __pyx_k_sleep[] = "sleep"; +static const char __pyx_k_split[] = "split"; +static const char __pyx_k_start[] = "start"; +static const char __pyx_k_str_2[] = "str_"; +static const char __pyx_k_ubyte[] = "ubyte"; +static const char __pyx_k_uchar[] = "uchar"; +static const char __pyx_k_uint8[] = "uint8"; +static const char __pyx_k_uintc[] = "uintc"; +static const char __pyx_k_uintp[] = "uintp"; +static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_value[] = "value = "; +static const char __pyx_k_CyCafe[] = "CyCafe"; +static const char __pyx_k_Cython[] = "Cython"; +static const char __pyx_k_Handle[] = "Handle="; +static const char __pyx_k_Member[] = "Member: "; +static const char __pyx_k_PyCafe[] = "PyCafe"; +static const char __pyx_k_append[] = "append"; +static const char __pyx_k_asDict[] = "asDict"; +static const char __pyx_k_attrib[] = "attrib"; +static const char __pyx_k_bool_2[] = "bool_"; +static const char __pyx_k_c_bool[] = "c_bool"; +static const char __pyx_k_c_byte[] = "c_byte"; +static const char __pyx_k_c_char[] = "c_char"; +static const char __pyx_k_c_int8[] = "c_int8"; +static const char __pyx_k_c_long[] = "c_long"; +static const char __pyx_k_c_uint[] = "c_uint"; +static const char __pyx_k_ctypes[] = "ctypes"; +static const char __pyx_k_decode[] = "decode"; +static const char __pyx_k_double[] = "double"; +static const char __pyx_k_encode[] = "encode"; +static const char __pyx_k_format[] = "format"; +static const char __pyx_k_handle[] = "_handle"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_isEnum[] = "isEnum"; +static const char __pyx_k_kwargs[] = "kwargs"; +static const char __pyx_k_mask_2[] = "mask"; +static const char __pyx_k_method[] = "method"; +static const char __pyx_k_name_2[] = ".name ="; +static const char __pyx_k_name_3[] = "__name__"; +static const char __pyx_k_name_4[] = "name"; +static const char __pyx_k_native[] = "native"; +static const char __pyx_k_netrfc[] = "netrfc"; +static const char __pyx_k_np_int[] = "np.int_"; +static const char __pyx_k_np_str[] = "np.str"; +static const char __pyx_k_pickle[] = "pickle"; +static const char __pyx_k_pvList[] = "pvList"; +static const char __pyx_k_pvctrl[] = "pvctrl"; +static const char __pyx_k_pvdata[] = "pvdata"; +static const char __pyx_k_pvlist[] = "_pvlist"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_single[] = "single"; +static const char __pyx_k_source[] = "_source"; +static const char __pyx_k_status[] = "status ="; +static const char __pyx_k_string[] = "string"; +static const char __pyx_k_struct[] = "struct"; +static const char __pyx_k_timeit[] = "timeit"; +static const char __pyx_k_tsDate[] = "tsDate ="; +static const char __pyx_k_type_2[] = ".type ="; +static const char __pyx_k_type_3[] = "type"; +static const char __pyx_k_uint16[] = "uint16"; +static const char __pyx_k_uint32[] = "uint32"; +static const char __pyx_k_uint64[] = "uint64"; +static const char __pyx_k_unpack[] = "unpack"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_ushort[] = "ushort"; +static const char __pyx_k_utf_16[] = "utf-16"; +static const char __pyx_k_utf_32[] = "utf_32"; +static const char __pyx_k_valSet[] = "valSet"; +static const char __pyx_k_values[] = "values"; +static const char __pyx_k_widget[] = "widget"; +static const char __pyx_k_Channel[] = "Channel"; +static const char __pyx_k_appname[] = "_appname"; +static const char __pyx_k_c_float[] = "c_float"; +static const char __pyx_k_c_int16[] = "c_int16"; +static const char __pyx_k_c_int32[] = "c_int32"; +static const char __pyx_k_c_int64[] = "c_int64"; +static const char __pyx_k_c_short[] = "c_short"; +static const char __pyx_k_c_ubyte[] = "c_ubyte"; +static const char __pyx_k_c_uint8[] = "c_uint8"; +static const char __pyx_k_c_ulong[] = "c_ulong"; +static const char __pyx_k_c_voidp[] = "c_voidp"; +static const char __pyx_k_c_wchar[] = "c_wchar"; +static const char __pyx_k_dbrBase[] = "dbrBase"; +static const char __pyx_k_deltaMS[] = "deltaMS"; +static const char __pyx_k_float16[] = "float16"; +static const char __pyx_k_float32[] = "float32"; +static const char __pyx_k_float64[] = "float64"; +static const char __pyx_k_float_2[] = "float_"; +static const char __pyx_k_fortran[] = "fortran"; +static const char __pyx_k_getAsyn[] = "getAsyn"; +static const char __pyx_k_getList[] = "getList"; +static const char __pyx_k_inspect[] = "inspect"; +static const char __pyx_k_isValid[] = "isValid"; +static const char __pyx_k_latin_1[] = "latin-1"; +static const char __pyx_k_memview[] = "memview"; +static const char __pyx_k_monid_2[] = "_monid"; +static const char __pyx_k_monid_3[] = "monid"; +static const char __pyx_k_ndarray[] = "ndarray"; +static const char __pyx_k_nelem_2[] = "nelem"; +static const char __pyx_k_nelem_d[] = "nelem = %d"; +static const char __pyx_k_np_bool[] = "np.bool_"; +static const char __pyx_k_np_byte[] = "np.byte"; +static const char __pyx_k_np_int8[] = "np.int8"; +static const char __pyx_k_np_intc[] = "np.intc"; +static const char __pyx_k_np_long[] = "np.long"; +static const char __pyx_k_numbers[] = "numbers"; +static const char __pyx_k_pulseID[] = "pulseID ="; +static const char __pyx_k_pv_name[] = "_pv_name"; +static const char __pyx_k_pvgroup[] = "pvgroup"; +static const char __pyx_k_showMax[] = "showMax"; +static const char __pyx_k_timeout[] = "timeout"; +static const char __pyx_k_unicode[] = "unicode"; +static const char __pyx_k_units_s[] = "units = %s"; +static const char __pyx_k_utf_8_2[] = "utf_8"; +static const char __pyx_k_valList[] = "valList"; +static const char __pyx_k_value_2[] = "value ="; +static const char __pyx_k_value_3[] = "value\t = "; +static const char __pyx_k_value_4[] = "value = {} ({})"; +static const char __pyx_k_value_5[] = "value\t = "; +static const char __pyx_k_value_6[] = "value"; +static const char __pyx_k_wrapper[] = "wrapper"; +static const char __pyx_k_Ellipsis[] = "Ellipsis"; +static const char __pyx_k_Handle_2[] = "Handle= "; +static const char __pyx_k_cMembers[] = "cMembers"; +static const char __pyx_k_c_char_p[] = "c_char_p"; +static const char __pyx_k_c_double[] = "c_double"; +static const char __pyx_k_c_size_t[] = "c_size_t"; +static const char __pyx_k_c_uint16[] = "c_uint16"; +static const char __pyx_k_c_uint32[] = "c_uint32"; +static const char __pyx_k_c_uint64[] = "c_uint64"; +static const char __pyx_k_c_ushort[] = "c_ushort"; +static const char __pyx_k_c_void_p[] = "c_void_p"; +static const char __pyx_k_dataType[] = "dataType = "; +static const char __pyx_k_datatype[] = "datatype ="; +static const char __pyx_k_deepcopy[] = "deepcopy"; +static const char __pyx_k_dictFlag[] = "dictFlag"; +static const char __pyx_k_getArray[] = "getArray"; +static const char __pyx_k_getCache[] = "getCache"; +static const char __pyx_k_getGroup[] = "getGroup"; +static const char __pyx_k_getUnits[] = "getUnits"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_handlePV[] = "handlePV"; +static const char __pyx_k_handle_2[] = "( handle ="; +static const char __pyx_k_handle_3[] = ".handle ="; +static const char __pyx_k_handle_4[] = "handle"; +static const char __pyx_k_itemsize[] = "itemsize"; +static const char __pyx_k_longlong[] = "longlong"; +static const char __pyx_k_np_float[] = "np.float_"; +static const char __pyx_k_np_int16[] = "np.int16"; +static const char __pyx_k_np_int32[] = "np.int32"; +static const char __pyx_k_np_int64[] = "np.int64"; +static const char __pyx_k_np_short[] = "np.short"; +static const char __pyx_k_np_str_2[] = "np.str_"; +static const char __pyx_k_np_uint8[] = "np.uint8"; +static const char __pyx_k_np_ulong[] = "np.ulong"; +static const char __pyx_k_pv_value[] = "pv_value"; +static const char __pyx_k_pymodule[] = "_pymodule"; +static const char __pyx_k_pyx_type[] = "__pyx_type"; +static const char __pyx_k_setNelem[] = "setNelem"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_source_2[] = ".source ="; +static const char __pyx_k_status_2[] = "status = "; +static const char __pyx_k_status_3[] = "status"; +static const char __pyx_k_status_4[] = "status="; +static const char __pyx_k_status_d[] = "status = %d"; +static const char __pyx_k_string_2[] = "string_"; +static const char __pyx_k_tsDate_2[] = "tsDate"; +static const char __pyx_k_userArgs[] = "userArgs ="; +static const char __pyx_k_utf_16_2[] = "utf_16"; +static const char __pyx_k_utf_none[] = "utf-none"; +static const char __pyx_k_waveform[] = "waveform"; +static const char __pyx_k_CafeError[] = "CafeError"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_c_ssize_t[] = "c_ssize_t"; +static const char __pyx_k_c_wchar_p[] = "c_wchar_p"; +static const char __pyx_k_cacheFlag[] = "cacheFlag"; +static const char __pyx_k_enumValue[] = "enumValue"; +static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_getPVList[] = "getPVList"; +static const char __pyx_k_getStatus[] = "getStatus"; +static const char __pyx_k_groupOpen[] = "groupOpen"; +static const char __pyx_k_handlesPV[] = "handlesPV"; +static const char __pyx_k_has_error[] = " has error: "; +static const char __pyx_k_np_string[] = "np.string"; +static const char __pyx_k_np_uint16[] = "np.uint16"; +static const char __pyx_k_np_uint32[] = "np.uint32"; +static const char __pyx_k_np_uint64[] = "np.uint64"; +static const char __pyx_k_np_ushort[] = "np.ushort"; +static const char __pyx_k_printFlag[] = "printFlag"; +static const char __pyx_k_pv_name_2[] = "pv_name"; +static const char __pyx_k_pyx_state[] = "__pyx_state"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_signature[] = "signature"; +static const char __pyx_k_tolerance[] = "tolerance"; +static const char __pyx_k_ulonglong[] = "ulonglong"; +static const char __pyx_k_unicode_2[] = "unicode_"; +static const char __pyx_k_valAction[] = "valAction"; +static const char __pyx_k_ENUM_value[] = "ENUM value:"; +static const char __pyx_k_GROUP_NAME[] = "GROUP NAME = "; +static const char __pyx_k_IndexError[] = "IndexError"; +static const char __pyx_k_No_Members[] = "No. Members = "; +static const char __pyx_k_PyCafe_pyx[] = "PyCafe.pyx"; +static const char __pyx_k_ValueError[] = "ValueError"; +static const char __pyx_k_c_longlong[] = "c_longlong"; +static const char __pyx_k_enumString[] = "enumString"; +static const char __pyx_k_error_code[] = "_error_code"; +static const char __pyx_k_error_info[] = "_error_info"; +static const char __pyx_k_error_text[] = "_error_text"; +static const char __pyx_k_exceptions[] = "exceptions"; +static const char __pyx_k_getContext[] = "getContext"; +static const char __pyx_k_getDbrBase[] = "getDbrBase"; +static const char __pyx_k_getPVCache[] = "getPVCache"; +static const char __pyx_k_getPVGroup[] = "getPVGroup"; +static const char __pyx_k_handleList[] = "handleList"; +static const char __pyx_k_hostName_s[] = "hostName = %s"; +static const char __pyx_k_memoryview[] = "memoryview"; +static const char __pyx_k_np_float16[] = "np.float16"; +static const char __pyx_k_np_float32[] = "np.float32"; +static const char __pyx_k_np_float64[] = "np.float64"; +static const char __pyx_k_np_ndarray[] = "np.ndarray"; +static const char __pyx_k_np_unicode[] = "np.unicode"; +static const char __pyx_k_openNoWait[] = "openNoWait"; +static const char __pyx_k_parameters[] = "parameters"; +static const char __pyx_k_pyx_result[] = "__pyx_result"; +static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static const char __pyx_k_scalarOnly[] = "scalarOnly"; +static const char __pyx_k_setDbrBase[] = "setDbrBase"; +static const char __pyx_k_statusList[] = "statusList"; +static const char __pyx_k_vectorList[] = "vectorList"; +static const char __pyx_k_0_1_2_3_4_5[] = "{0} {1} \n{2} {3} {4} \n{5}"; +static const char __pyx_k_CafePVError[] = "CafePVError"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_MemoryError[] = "MemoryError"; +static const char __pyx_k_MemoryNanny[] = "MemoryNanny"; +static const char __pyx_k_OrderedDict[] = "OrderedDict"; +static const char __pyx_k_PickleError[] = "PickleError"; +static const char __pyx_k_UserWarning[] = "UserWarning"; +static const char __pyx_k_alarmStatus[] = "alarmStatus = "; +static const char __pyx_k_array_array[] = "array.array"; +static const char __pyx_k_c_ulonglong[] = "c_ulonglong"; +static const char __pyx_k_cafeDbrType[] = "cafeDbrType="; +static const char __pyx_k_channelID_s[] = "channelID = %s"; +static const char __pyx_k_channelInfo[] = "channelInfo"; +static const char __pyx_k_className_s[] = "className = %s"; +static const char __pyx_k_collections[] = "collections"; +static const char __pyx_k_dbrDataType[] = "dbrDataType="; +static const char __pyx_k_enumStrings[] = "enumStrings ="; +static const char __pyx_k_freeing_ptr[] = "freeing ptr="; +static const char __pyx_k_gHandleName[] = "gHandleName"; +static const char __pyx_k_ghandleName[] = "ghandleName"; +static const char __pyx_k_handlePVSet[] = "handlePVSet"; +static const char __pyx_k_isConnected[] = "isConnected"; +static const char __pyx_k_monitorStop[] = "monitorStop"; +static const char __pyx_k_np_string_2[] = "np.string_"; +static const char __pyx_k_openPrepare[] = "openPrepare"; +static const char __pyx_k_precision_d[] = "precision = %d"; +static const char __pyx_k_printHandle[] = "printHandle"; +static const char __pyx_k_GROUP_HANDLE[] = "GROUP HANDLE = "; +static const char __pyx_k_GROUP_STATUS[] = "GROUP STATUS = "; +static const char __pyx_k_ICAFE_NORMAL[] = "ICAFE_NORMAL"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_accessRead_d[] = "accessRead = %d"; +static const char __pyx_k_c_longdouble[] = "c_longdouble"; +static const char __pyx_k_closeHandles[] = "closeHandles"; +static const char __pyx_k_error_code_2[] = "error_code:"; +static const char __pyx_k_error_code_3[] = ".error_code ="; +static const char __pyx_k_error_info_2[] = "error_info:"; +static const char __pyx_k_error_info_3[] = ".error_info ="; +static const char __pyx_k_error_text_2[] = "error_text:"; +static const char __pyx_k_error_text_3[] = ".error_text ="; +static const char __pyx_k_getCtrlCache[] = "getCtrlCache"; +static const char __pyx_k_getPrecision[] = "getPrecision"; +static const char __pyx_k_getTimeStamp[] = "getTimeStamp"; +static const char __pyx_k_groupHandles[] = "groupHandles"; +static const char __pyx_k_monitorStart[] = "monitorStart"; +static const char __pyx_k_np_unicode_2[] = "np.unicode_"; +static const char __pyx_k_pvhandleList[] = "pvhandleList"; +static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; +static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_version_info[] = "version_info"; +static const char __pyx_k_CAFEException[] = "CAFEException"; +static const char __pyx_k_CafeException[] = "------CafeException-----------------------------------------------------"; +static const char __pyx_k_accessWrite_d[] = "accessWrite = %d"; +static const char __pyx_k_alarmSeverity[] = "alarmSeverity = "; +static const char __pyx_k_alarmStatus_2[] = "alarmStatus"; +static const char __pyx_k_alarmStatus_d[] = "alarmStatus = %d"; +static const char __pyx_k_attachContext[] = "attachContext"; +static const char __pyx_k_connectFlag_d[] = "connectFlag = %d"; +static const char __pyx_k_getArrayCache[] = "getArrayCache"; +static const char __pyx_k_getMonitorIDs[] = "getMonitorIDs"; +static const char __pyx_k_getNoMonitors[] = "getNoMonitors"; +static const char __pyx_k_getScalarList[] = "getScalarList"; +static const char __pyx_k_getWFAsString[] = "getWFAsString"; +static const char __pyx_k_handlePVMatch[] = "handlePVMatch"; +static const char __pyx_k_keepGroupName[] = "keepGroupName"; +static const char __pyx_k_monitorpolicy[] = "monitorpolicy"; +static const char __pyx_k_nanny_for_ptr[] = "nanny for ptr="; +static const char __pyx_k_not_connected[] = " not connected"; +static const char __pyx_k_numpy_ndarray[] = "numpy.ndarray"; +static const char __pyx_k_printHandlesV[] = "printHandlesV"; +static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_setScalarList[] = "setScalarList"; +static const char __pyx_k_checkForHandle[] = "checkForHandle"; +static const char __pyx_k_getChannelInfo[] = "getChannelInfo"; +static const char __pyx_k_getDescription[] = "getDescription"; +static const char __pyx_k_getEnumStrings[] = "getEnumStrings"; +static const char __pyx_k_getNonBlocking[] = "getNonBlocking"; +static const char __pyx_k_get_wf_express[] = "get_wf_express"; +static const char __pyx_k_handlePVAction[] = "handlePVAction"; +static const char __pyx_k_hasDescription[] = "hasDescription"; +static const char __pyx_k_maskHasDBE_LOG[] = "maskHasDBE_LOG ="; +static const char __pyx_k_monitorStopAll[] = "monitorStopAll()"; +static const char __pyx_k_not_recognized[] = "not recognized! "; +static const char __pyx_k_openMonitorNow[] = "openMonitorNow"; +static const char __pyx_k_openNowAndWait[] = "openNowAndWait"; +static const char __pyx_k_pymodule_parts[] = "_pymodule_parts"; +static const char __pyx_k_python_version[] = "_python_version"; +static const char __pyx_k_setCallbackGet[] = "setCallbackGet"; +static const char __pyx_k_setCallbackPut[] = "setCallbackPut"; +static const char __pyx_k_statusAsString[] = "statusAsString"; +static const char __pyx_k_CafeException_2[] = "CafeException"; +static const char __pyx_k_View_MemoryView[] = "View.MemoryView"; +static const char __pyx_k_alarmSeverity_2[] = "alarmSeverity"; +static const char __pyx_k_alarmSeverity_d[] = "alarmSeverity = %d"; +static const char __pyx_k_allocate_buffer[] = "allocate_buffer"; +static const char __pyx_k_connectionState[] = "connectionState = "; +static const char __pyx_k_devicePositionV[] = "devicePositionV"; +static const char __pyx_k_dtype_is_object[] = "dtype_is_object"; +static const char __pyx_k_getCompoundList[] = "getCompoundList"; +static const char __pyx_k_getHandleFromPV[] = "getHandleFromPV"; +static const char __pyx_k_getPVGroupCache[] = "getPVGroupCache"; +static const char __pyx_k_get_handlePV_dt[] = "get(handlePV, dt)"; +static const char __pyx_k_memoryviewslice[] = "memoryviewslice"; +static const char __pyx_k_noEnumStrings_d[] = "noEnumStrings = %d"; +static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_status_from_pxy[] = "status from pxy"; +static const char __pyx_k_verify_handlepv[] = "verify_handlepv"; +static const char __pyx_k_waitForGetEvent[] = "waitForGetEvent"; +static const char __pyx_k_Error_in_Element[] = "Error in Element "; +static const char __pyx_k_getChannelDevice[] = "getChannelDevice"; +static const char __pyx_k_maskHasDBE_ALARM[] = "maskHasDBE_ALARM ="; +static const char __pyx_k_maskHasDBE_VALUE[] = "maskHasDBE_VALUE ="; +static const char __pyx_k_no_encoding_done[] = "no encoding done"; +static const char __pyx_k_setNelemToNative[] = "setNelemToNative"; +static const char __pyx_k_supplementHandle[] = "supplementHandle"; +static const char __pyx_k_Assuming_DBR_TIME[] = "Assuming DBR_TIME"; +static const char __pyx_k_ENUM_string_value[] = "ENUM string value:"; +static const char __pyx_k_ICAFE_TYPENOTCONN[] = "ICAFE_TYPENOTCONN"; +static const char __pyx_k_PY_VERSION_HEX_is[] = "PY_VERSION_HEX is "; +static const char __pyx_k_def_getScalarList[] = "def getScalarList:"; +static const char __pyx_k_getDataTypeNative[] = "getDataTypeNative"; +static const char __pyx_k_getEnumFromString[] = "getEnumFromString"; +static const char __pyx_k_getStringFromEnum[] = "getStringFromEnum"; +static const char __pyx_k_groupMonitorStart[] = "groupMonitorStart"; +static const char __pyx_k_lowerAlarmLimit_f[] = "lowerAlarmLimit = %f"; +static const char __pyx_k_memoryviewslice_2[] = "_memoryviewslice"; +static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum"; +static const char __pyx_k_supplementHandles[] = "supplementHandles"; +static const char __pyx_k_upperAlarmLimit_f[] = "upperAlarmLimit = %f"; +static const char __pyx_k_with_error_status[] = "with error status="; +static const char __pyx_k_Possible_types_are[] = "'. Possible types are:"; +static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError"; +static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError"; +static const char __pyx_k_ca_pend_io_timeout[] = "ca_pend_io(timeout)"; +static const char __pyx_k_checkForHandleList[] = "checkForHandleList"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_def_getScalarArray[] = "def getScalarArray:"; +static const char __pyx_k_getCompoundPVGroup[] = "getCompoundPVGroup"; +static const char __pyx_k_getDataTypeRequest[] = "getDataTypeRequest"; +static const char __pyx_k_getTimeStampAsDate[] = "getTimeStampAsDate"; +static const char __pyx_k_openMonitorPrepare[] = "openMonitorPrepare"; +static const char __pyx_k_printStatusIfError[] = "printStatusIfError"; +static const char __pyx_k_strided_and_direct[] = ""; +static const char __pyx_k_supplementHandlesV[] = "supplementHandlesV"; +static const char __pyx_k_Exception_raised_in[] = "Exception raised in"; +static const char __pyx_k_ICAFE_CS_NEVER_CONN[] = "ICAFE_CS_NEVER_CONN"; +static const char __pyx_k_alarmStatusAsString[] = "alarmStatusAsString"; +static const char __pyx_k_cafeConnectionState[] = "cafeConnectionState = "; +static const char __pyx_k_checkForGroupHandle[] = "checkForGroupHandle"; +static const char __pyx_k_decode_utf_16_error[] = "decode utf_16 error"; +static const char __pyx_k_encode_utf_16_error[] = "encode utf_16 error"; +static const char __pyx_k_getChannelAttribute[] = "getChannelAttribute"; +static const char __pyx_k_getChannelDataStore[] = "getChannelDataStore"; +static const char __pyx_k_getHandleFromPVName[] = "getHandleFromPVName"; +static const char __pyx_k_lowerControlLimit_f[] = "lowerControlLimit = %f"; +static const char __pyx_k_lowerDisplayLimit_f[] = "lowerDisplayLimit = %f"; +static const char __pyx_k_lowerWarningLimit_f[] = "lowerWarningLimit = %f"; +static const char __pyx_k_maskHasDBE_PROPERTY[] = "maskHasDBE_PROPERTY="; +static const char __pyx_k_notify_milliseconds[] = "notify_milliseconds"; +static const char __pyx_k_set_handlePV_valSet[] = "set(handlePV, valSet)"; +static const char __pyx_k_upperControlLimit_f[] = "upperControlLimit = %f"; +static const char __pyx_k_upperDisplayLimit_f[] = "upperDisplayLimit = %f"; +static const char __pyx_k_upperWarningLimit_f[] = "upperWarningLimit = %f"; +static const char __pyx_k_Analysing_statusList[] = "Analysing statusList[]..."; +static const char __pyx_k_Returning_memoryview[] = "Returning memoryview"; +static const char __pyx_k_getDbrBaseInCallback[] = "getDbrBaseInCallback"; +static const char __pyx_k_groupOpen_char_gname[] = "groupOpen(char * gname)"; +static const char __pyx_k_initCallbackComplete[] = "initCallbackComplete"; +static const char __pyx_k_strided_and_indirect[] = ""; +static const char __pyx_k_1_19_3_py37_gcc_7_3_0[] = "1.19.3-py37-gcc-7.3.0"; +static const char __pyx_k_Allowed_DBR_TYPEs_are[] = "Allowed DBR_TYPEs are:"; +static const char __pyx_k_ICAFE_CA_OP_CONN_DOWN[] = "ICAFE_CA_OP_CONN_DOWN"; +static const char __pyx_k_The_value_entered_was[] = "The value entered was"; +static const char __pyx_k_alarmSeverityAsString[] = "alarmSeverityAsString"; +static const char __pyx_k_ca_pend_event_timeout[] = "ca_pend_event(timeout)"; +static const char __pyx_k_contiguous_and_direct[] = ""; +static const char __pyx_k_getDataTypeInCallback[] = "getDataTypeInCallback"; +static const char __pyx_k_is_not_a_valid_option[] = "is not a valid option. "; +static const char __pyx_k_setGetCacheWaitPolicy[] = "setGetCacheWaitPolicy"; +static const char __pyx_k_Entering_0_for_element[] = "Entering 0 for element"; +static const char __pyx_k_MemoryView_of_r_object[] = ""; +static const char __pyx_k_No_of_group_members_is[] = "No of group members is "; +static const char __pyx_k_closeChannelKeepHandle[] = "closeChannelKeepHandle"; +static const char __pyx_k_getAlarmStatusSeverity[] = "getAlarmStatusSeverity"; +static const char __pyx_k_getMonitorIDInCallback[] = "getMonitorIDInCallback"; +static const char __pyx_k_getMonitorIDsInWaiting[] = "getMonitorIDsInWaiting"; +static const char __pyx_k_groupClose_gHandleName[] = "groupClose(gHandleName)"; +static const char __pyx_k_hasAlarmStatusSeverity[] = "hasAlarmStatusSeverity"; +static const char __pyx_k_setPyConnectCallbackFn[] = "setPyConnectCallbackFn"; +static const char __pyx_k_Cython_Compiler_Options[] = "Cython.Compiler.Options"; +static const char __pyx_k_MemoryView_of_r_at_0x_x[] = ""; +static const char __pyx_k_contiguous_and_indirect[] = ""; +static const char __pyx_k_getChannelInfo_handlePV[] = "getChannelInfo(handlePV)"; +static const char __pyx_k_hence_assuming_DBR_TIME[] = "hence assuming DBR_TIME"; +static const char __pyx_k_members_while_group_has[] = "members while group has"; +static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'"; +static const char __pyx_k_and_thus_assume_a_string[] = " and thus assume a string"; +static const char __pyx_k_getDbrDataTypeInCallback[] = "getDbrDataTypeInCallback"; +static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d."; +static const char __pyx_k_getHandlesFromWithinGroup[] = "getHandlesFromWithinGroup"; +static const char __pyx_k_groupDefineFromCollection[] = "groupDefineFromCollection"; +static const char __pyx_k_Error_in_def_getScalarList[] = "Error in def getScalarList: "; +static const char __pyx_k_Failed_to_instantiate_CAFE[] = "Failed to instantiate CAFE()"; +static const char __pyx_k_etNelemToRetrieveFromCache[] = "etNelemToRetrieveFromCache"; +static const char __pyx_k_pyx_unpickle_CafeException[] = "__pyx_unpickle_CafeException"; +static const char __pyx_k_setChannelRequestPolicyGet[] = "setChannelRequestPolicyGet"; +static const char __pyx_k_updateMonitorPolicyDeltaMS[] = "updateMonitorPolicyDeltaMS"; +static const char __pyx_k_ERROR_GROUP_MEMBER_MISMATCH[] = "ERROR: GROUP MEMBER MISMATCH!!"; +static const char __pyx_k_Error_in_def_getScalarArray[] = "Error in def getScalarArray: "; +static const char __pyx_k_as_channel_is_not_connected[] = "as channel is not connected!"; +static const char __pyx_k_in_PyCafe_def_getScalarList[] = " in PyCafe def getScalarList"; +static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array"; +static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; +static const char __pyx_k_reports_the_following_error[] = ") reports the following error:"; +static const char __pyx_k_Error_in_def_getCompoundList[] = "Error in def getCompoundList: "; +static const char __pyx_k_groupMonitorStop_ghandleName[] = "groupMonitorStop(ghandleName)"; +static const char __pyx_k_in_PyCafe_def_getCompundList[] = " in PyCafe def getCompundList"; +static const char __pyx_k_in_PyCafe_def_getScalarArray[] = " in PyCafe def getScalarArray"; +static const char __pyx_k_memoryview_numpy_array_ctypes[] = "memoryview, numpy, array, ctypes"; +static const char __pyx_k_openMonitorNowAndWait_timeout[] = "openMonitorNowAndWait(timeout)"; +static const char __pyx_k_setGetActionWhenMonitorPolicy[] = "setGetActionWhenMonitorPolicy"; +static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; +static const char __pyx_k_Error_Warning_from_def_getAsyn[] = "Error/Warning from def getAsyn: "; +static const char __pyx_k_Exception_raised_in_PyCafe_pyx[] = "Exception raised in PyCafe.pyx:"; +static const char __pyx_k_Warning_from_groupMonitorStart[] = "***Warning*** from groupMonitorStart for handle(orPV)="; +static const char __pyx_k_getCtrl_handlePV_str_dt_native[] = "getCtrl(handlePV, str dt='native')"; +static const char __pyx_k_groupMemberList_self_str_gname[] = "groupMemberList(self, str gname)"; +static const char __pyx_k_monitorStop_handlePV_mpid_None[] = "monitorStop(handlePV, mpid=None)"; +static const char __pyx_k_strided_and_direct_or_indirect[] = ""; +static const char __pyx_k_verify_handlepv_locals_wrapper[] = "verify_handlepv..wrapper"; +static const char __pyx_k_while_list_of_callback_objects[] = " while list of callback objects is"; +static const char __pyx_k_Error_in_def_grouping_for_group[] = "Error in def grouping for group named"; +static const char __pyx_k_Execute_getEnumStrings_handlePV[] = "Execute getEnumStrings(handlePV) to view enumerated values"; +static const char __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1[] = "GET_FROM_CACHE (0), GET_FROM_IOC (1)"; +static const char __pyx_k_Second_input_argument_should_be[] = "Second input argument should be of of type "; +static const char __pyx_k_TIMEOUT_in_getGroup_swithing_to[] = "TIMEOUT in getGroup; swithing to getCompoundPVGroup"; +static const char __pyx_k_ThandlePVSet_list_member_should[] = "ThandlePVSet list member should be of type if handle, else if PV"; +static const char __pyx_k_The_pv_name_entered_within_list[] = "The pv name entered within list should be of type or "; +static const char __pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE[] = "USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS"; +static const char __pyx_k_Valid_input_parameters_for_data[] = "Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'"; +static const char __pyx_k_Warning_from_groupMonitorStartW[] = "***Warning*** from groupMonitorStartWithCBList for handle(orPV)="; +static const char __pyx_k_Warning_from_monitorStart_for_h[] = "***Warning*** from monitorStart for handle="; +static const char __pyx_k_does_not_match_the_length_of_da[] = " does not match the length of data list "; +static const char __pyx_k_getCache_handlePV_str_dt_native[] = "getCache(handlePV, str dt='native')"; +static const char __pyx_k_getScalarList_handleList_str_dt[] = "getScalarList(handleList, str dt, bint cacheFlag)"; +static const char __pyx_k_matchManyWithStatus_list_valSet[] = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_monitorStart_handlePV_object_cb[] = "monitorStart(handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_py_cb_handle_get_wrapper_GET_Ha[] = " py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:"; +static const char __pyx_k_self_ptr_cannot_be_converted_to[] = "self.ptr cannot be converted to a Python object for pickling"; +static const char __pyx_k_setCompoundList_handleList_list[] = "setCompoundList(handleList, list vectorList)"; +static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; +static const char __pyx_k_A_handle_can_never_hold_a_negati[] = "A handle can never hold a negative value! "; +static const char __pyx_k_Allowed_ChannelGetActionWhenMoni[] = "Allowed ChannelGetActionWhenMonitorPolicyKind are:"; +static const char __pyx_k_Allowed_ChannelGetCacheWaitPolic[] = "Allowed ChannelGetCacheWaitPolicyKind are:"; +static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; +static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; +static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview"; +static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview"; +static const char __pyx_k_Cython_interface_to_the_C_CAFE_l[] = "Cython interface to the C++ CAFE library. |br|\nTo import the resulting Python module and instantiate the Cython class:\n::\n\n import PyCafe\n cafe = PyCafe.CyCafe()\n cyca = PyCafe.CyCa()\n\n"; +static const char __pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2[] = "DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)"; +static const char __pyx_k_Data_to_be_presented_in_native_d[] = "Data to be presented in native data type"; +static const char __pyx_k_Datatype_unknown_returning_value[] = "Datatype unknown, returning value 0"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g[] = "EXCEPTION RAISED IN PyCafe def getScalarArray. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m[] = "EXCEPTION RAISED IN PyCafe def monitorStop. \n monitorPolicy ID (mpid) should be of type "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s[] = "EXCEPTION RAISED IN PyCafe def setScalarList. \n First input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w[] = "EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g[] = "EXCEPTION RAISED in PyCafe def getChannelDataStore"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m[] = "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s[] = "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d"; +static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; +static const char __pyx_k_Error_in_PyCafe_def_getPVGroupCa[] = "Error in PyCafe def getPVGroupCache. Status = %d"; +static const char __pyx_k_Error_in_PyCafe_def_getPVGroup_S[] = "Error in PyCafe def getPVGroup. Status = %d"; +static const char __pyx_k_Error_in_def_waitForBundledEvent[] = "Error in def waitForBundledEvents: "; +static const char __pyx_k_Exception_raised_from_CyCafe_met[] = "Exception raised from CyCafe method:"; +static const char __pyx_k_First_Input_argument_should_be_o[] = "First Input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_if_not_list[] = "First input argument (if not list), should be of type if group handle, else if group name"; +static const char __pyx_k_First_input_argument_should_be_a[] = "First input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_First_input_argument_should_be_c[] = "First input argument should be for group name"; +static const char __pyx_k_First_input_argument_should_be_o[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; +static const char __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N[] = "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1),GET_CACHE_WAIT (2)"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x8a[] = "Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))"; +static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported"; +static const char __pyx_k_Input_argument_if_given_should_b[] = "Input argument, if given, should be if list of handles or PVs, else of type if handle or if PV. If no input argument, then all channels are supplemented."; +static const char __pyx_k_Input_argument_pv_should_be_of_t[] = "Input argument, pv, should be of type "; +static const char __pyx_k_Input_argument_should_be_of_type[] = "Input argument, should be of type if handle, else if pv name"; +static const char __pyx_k_Input_data_whether_within_a_list[] = "Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \nor not) should be of of type , or "; +static const char __pyx_k_Invalid_handle_of_type_class_int[] = "Invalid handle of type . If handle is not known, \nsuggest using PV name of type as input argument instead. "; +static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s"; +static const char __pyx_k_List_input_arguments_should_be_o[] = "List input arguments, should be of type if group handle, else if group name"; +static const char __pyx_k_List_input_arguments_should_be_t[] = "List input arguments, should be < type 'int' >if handle, else < type 'str' > if pv name"; +static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; +static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)"; +static const char __pyx_k_PyCafe_def_setGroup_Unusual_data[] = "PyCafe def setGroup: Unusual data type for element"; +static const char __pyx_k_PyCafe_def_set_WARNING_DATA_TYPE[] = "PyCafe def set WARNING: DATA TYPE NOT SUPPORTED"; +static const char __pyx_k_PyCafe_pyx_We_do_not_cater_for_t[] = "PyCafe.pyx: We do not cater for type "; +static const char __pyx_k_PyCafe_pyx_getArray_array_type_d[] = "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list"; +static const char __pyx_k_Second_input_argument_if_not_a_l[] = "Second input argument (if not a list), should be of type if group handle, else if group name"; +static const char __pyx_k_TIMEOUT_in_getGroup_switching_to[] = "TIMEOUT in getGroup; switching to getCompoundList"; +static const char __pyx_k_Third_input_argument_should_be_o[] = "Third input argument, should be of type else of "; +static const char __pyx_k_This_line_in_PyCafe_def_getAsLis[] = "This line in PyCafe def getAsList should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_getCache[] = "This line in PyCafe def getCache should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_get_shou[] = "This line in PyCafe def get should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_setCompo[] = "This line in PyCafe def setCompoundList should never appear!"; +static const char __pyx_k_This_line_in_PyCafe_def_setScala[] = "This line in PyCafe def setScalarList should never appear!"; +static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; +static const char __pyx_k_Unknow_array_type_in_user_reques[] = "Unknow array type in user request for art='"; +static const char __pyx_k_Unknown_array_type_in_user_reque[] = "Unknown array type in user request for art='"; +static const char __pyx_k_WARNING_PyCafe_def_setDbrBase_ha[] = "WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)"; +static const char __pyx_k_WARNING_PyCafe_def_setGetActionW[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicy"; +static const char __pyx_k_WARNING_PyCafe_def_setGetCacheWa[] = "WARNING: PyCafe def setGetCacheWaitPolicy(handle/PV, ChannelGetCacheWaitPolicyKind)"; +static const char __pyx_k_closeDisconnectedChannelsWithinG[] = "closeDisconnectedChannelsWithinGroup"; +static const char __pyx_k_dbr_base_type_should_be_one_of_D[] = "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL"; +static const char __pyx_k_gameSetAndMatch_list_handlePVSet[] = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_getCompoundList_handleList_str_d[] = "getCompoundList(handleList, str dt='native')"; +static const char __pyx_k_getCompoundPVGroup_ghandleName_s[] = "getCompoundPVGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getCtrlCache_handlePV_str_dt_nat[] = "getCtrlCache(handlePV, str dt='native')"; +static const char __pyx_k_getDictionary_handleList_dt_cach[] = "getDictionary(handleList, dt, cacheFlag )"; +static const char __pyx_k_getGroupCache_self_ghandleName_s[] = "getGroupCache(self, ghandleName, str dt='native')"; +static const char __pyx_k_getGroup_ghandleName_str_dt_nati[] = "getGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getHandleFromPVWithinGroup_pv_gh[] = "getHandleFromPVWithinGroup(pv. ghandleName)"; +static const char __pyx_k_getPVCache_handlePV_str_dt_nativ[] = "getPVCache(handlePV, str dt='native'"; +static const char __pyx_k_getPVGroup_ghandleName_str_dt_na[] = "getPVGroup(ghandleName, str dt='native')"; +static const char __pyx_k_getScalarArray_handleList_str_dt[] = "getScalarArray(handleList, str dt, bint cacheFlag)"; +static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)"; +static const char __pyx_k_groupMonitorStartWithCBList_ghan[] = "groupMonitorStartWithCBList(ghandleName, cb,dbr, mask, notify_milliseconds)"; +static const char __pyx_k_groupMonitorStart_ghandleName_cb[] = "groupMonitorStart(ghandleName, cb, dbr, mask)"; +static const char __pyx_k_grouping_char_gname_list__pvlist[] = "grouping(char * gname, list _pvlist)"; +static const char __pyx_k_handleMatch_list_member_should_b[] = "handleMatch list member should be of type if handle, else if PV"; +static const char __pyx_k_handlePVAction_list_member_shoul[] = "handlePVAction list member should be of type if handle, else if PV"; +static const char __pyx_k_hence_assuming_default_value_GET[] = "hence assuming default value GET_CACHE_WAIT"; +static const char __pyx_k_input_argument_timeout_must_be_a[] = "input argument, timeout, must be a positive number!\ntimeout reset to:"; +static const char __pyx_k_matchMany_list_valSet_list_handl[] = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_match_double_valSet_handlePVMatc[] = "match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; +static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static const char __pyx_k_openGroupNowAndWaitForInputGroup[] = "openGroupNowAndWaitForInputGroups"; +static const char __pyx_k_setAndMatchMany_list_handlePVSet[] = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static const char __pyx_k_setAndMatch_handlePVSet_double_v[] = "setAndMatch(handlePVSet, double valSet,handlePVMatch, double tolerance,double timeout, bint printFlag)"; +static const char __pyx_k_setGroup_self_ghandleName_list_v[] = "setGroup(self, ghandleName, list vectorList)"; +static const char __pyx_k_setNelemCtrl_handlePV_unsigned_i[] = "setNelemCtrl(handlePV, unsigned int nelem)"; +static const char __pyx_k_setNelemToRetrieveFromCacheToOne[] = "setNelemToRetrieveFromCacheToOne"; +static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; +static const char __pyx_k_waitForBundledEvents_self_handle[] = "waitForBundledEvents(self, handleList)"; +static const char __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2[] = " GET_FROM_CACHE (0), GET_FROM_IOC (1)"; +static const char __pyx_k_Second_input_argument_should_be_2[] = "Second input argument should be a of of type "; +static const char __pyx_k_does_not_match_the_length_of_da_2[] = " does not match the length of data list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2[] = "EXCEPTION RAISED IN PyCafe def getScalarArray. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5[] = "EXCEPTION RAISED IN PyCafe def getDictionary. \nFirst input argument should be of handles or PVs\nelse for CAFE 'group' name"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument should be of handles or PVs\nelse for CAFE 'group' name"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9[] = "EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \nFirst input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2[] = "EXCEPTION RAISED IN PyCafe def matchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2[] = "EXCEPTION RAISED IN PyCafe def setScalarList. Length of handle list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be of handles or PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. Length of handle list "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nUnknown data input; should be one of of type , , , "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7[] = "EXCEPTION RAISED IN PyCafe def setGroup. \nUnknown data input; should be one of of type , , , "; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and second (valSet) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2[] = "EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \nFirst input argument, should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2[] = "EXCEPTION RAISED in PyCafe def getNonBlocking. Status = {0}"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3[] = "EXCEPTION RAISED in PyCafe def getCache. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4[] = "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2[] = "EXCEPTION RAISED in PyCafe def matchMany. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3[] = "EXCEPTION RAISED in PyCafe def match. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2[] = "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d"; +static const char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3[] = "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne"; +static const char __pyx_k_First_input_argument_if_not_list_2[] = "First input argument (if not list), should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_a_2[] = "First input argument should be a 'list' of of type if handles, else if PVs"; +static const char __pyx_k_First_input_argument_should_be_a_3[] = "First input argument, should be a 'list' of of type if handles, else if PVs"; +static const char __pyx_k_First_input_argument_should_be_a_4[] = "First input argument should be a 'list' of of type if handles or if PVs"; +static const char __pyx_k_First_input_argument_should_be_o_2[] = "First input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_3[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_4[] = "First input argument should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_5[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_6[] = "First input argument, should be of type if handle,else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_7[] = "First input argument, should be of type if group handle,else if group name"; +static const char __pyx_k_First_input_argument_should_be_o_8[] = "First input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_First_input_argument_should_be_o_9[] = "First input argument, should be of type if group handle, else if group name"; +static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; +static const char __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2[] = "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), GET_CACHE_WAIT (2)"; +static const char __pyx_k_Input_argument_should_be_of_type_2[] = "Input argument should be of type if handle,else if pvname"; +static const char __pyx_k_List_input_arguments_should_be_o_2[] = "List input arguments, should be of type if handleelse if pvname"; +static const char __pyx_k_Third_input_argument_should_be_o_2[] = "Third input argument, should be of type if handle,else if PV"; +static const char __pyx_k_WARNING_PyCafe_def_setGetActionW_2[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles"; +static const char __pyx_k_WARNING_PyCafe_def_setGetCacheWa_2[] = "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( ChannelGetCacheWaitPolicyKind)"; +static const char __pyx_k_dbr_base_type_should_be_one_of_D_2[] = "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL"; +static const char __pyx_k_hence_assuming_default_value_GET_2[] = "hence assuming default value GET_FROM_IOC"; +static const char __pyx_k_input_argument_timeout_must_be_a_2[] = "input argument, timeout, must be a positive number!\ntimeout reset to CAFE default:"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10[] = "EXCEPTION RAISED IN PyCafe def getCache. \n First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11[] = "EXCEPTION RAISED IN PyCafe def getPVCache. \n \t\t\tFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12[] = "EXCEPTION RAISED IN PyCafe def getCtrl. \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13[] = "EXCEPTION RAISED IN PyCafe def getCtrlCache. \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14[] = "EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \nFirst input argument, should be of type if handle, else if PV"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nInput cb should be of type and give the list of cb objects"; +static const char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_16[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nNo of group members doe not match the length of callback object list"; +static const char __pyx_k_First_input_argument_should_be_o_10[] = "First input argument, should be of type if handle, else if PV"; +static const char __pyx_k_First_input_argument_should_be_o_11[] = "First input argument should be of type if group handle, else if group name"; +static PyObject *__pyx_kp_u_0; +static PyObject *__pyx_kp_u_0_1_2_3_4_5; +static PyObject *__pyx_kp_u_1_19_3_py37_gcc_7_3_0; +static PyObject *__pyx_kp_u_7_0_6; +static PyObject *__pyx_n_s_ASCII; +static PyObject *__pyx_kp_u_A_handle_can_never_hold_a_negati; +static PyObject *__pyx_kp_u_Allowed_ChannelGetActionWhenMoni; +static PyObject *__pyx_kp_u_Allowed_ChannelGetCacheWaitPolic; +static PyObject *__pyx_kp_u_Allowed_DBR_TYPEs_are; +static PyObject *__pyx_kp_u_Analysing_statusList; +static PyObject *__pyx_n_s_Array; +static PyObject *__pyx_kp_u_Assuming_DBR_TIME; +static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; +static PyObject *__pyx_n_u_C; +static PyObject *__pyx_n_u_CAFEException; +static PyObject *__pyx_n_u_CafeError; +static PyObject *__pyx_kp_u_CafeException; +static PyObject *__pyx_n_s_CafeException_2; +static PyObject *__pyx_n_u_CafePVError; +static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; +static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor; +static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi; +static PyObject *__pyx_kp_s_Cannot_index_with_type_s; +static PyObject *__pyx_n_u_Channel; +static PyObject *__pyx_n_s_CyCa; +static PyObject *__pyx_n_s_CyCafe; +static PyObject *__pyx_n_s_Cython; +static PyObject *__pyx_n_s_Cython_Compiler_Options; +static PyObject *__pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2; +static PyObject *__pyx_kp_u_Data_to_be_presented_in_native_d; +static PyObject *__pyx_kp_u_Datatype_unknown_returning_value; +static PyObject *__pyx_kp_u_EGU; +static PyObject *__pyx_kp_u_ENUM_string_value; +static PyObject *__pyx_kp_u_ENUM_value; +static PyObject *__pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_16; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3; +static PyObject *__pyx_n_s_Ellipsis; +static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr; +static PyObject *__pyx_kp_u_Entering_0_for_element; +static PyObject *__pyx_kp_u_Error_Warning_from_def_getAsyn; +static PyObject *__pyx_kp_u_Error_in_Element; +static PyObject *__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa; +static PyObject *__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S; +static PyObject *__pyx_kp_u_Error_in_def_getCompoundList; +static PyObject *__pyx_kp_u_Error_in_def_getScalarArray; +static PyObject *__pyx_kp_u_Error_in_def_getScalarList; +static PyObject *__pyx_kp_u_Error_in_def_grouping_for_group; +static PyObject *__pyx_kp_u_Error_in_def_waitForBundledEvent; +static PyObject *__pyx_kp_u_Exception_raised_from_CyCafe_met; +static PyObject *__pyx_kp_u_Exception_raised_in; +static PyObject *__pyx_kp_u_Exception_raised_in_PyCafe_pyx; +static PyObject *__pyx_kp_u_Execute_getEnumStrings_handlePV; +static PyObject *__pyx_kp_u_Failed_to_instantiate_CAFE; +static PyObject *__pyx_kp_u_First_Input_argument_should_be_o; +static PyObject *__pyx_kp_u_First_input_argument_if_not_list; +static PyObject *__pyx_kp_u_First_input_argument_if_not_list_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_3; +static PyObject *__pyx_kp_u_First_input_argument_should_be_a_4; +static PyObject *__pyx_kp_u_First_input_argument_should_be_c; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_10; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_11; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_3; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_4; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_5; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_6; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_7; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_8; +static PyObject *__pyx_kp_u_First_input_argument_should_be_o_9; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; +static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; +static PyObject *__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N; +static PyObject *__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2; +static PyObject *__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1; +static PyObject *__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2; +static PyObject *__pyx_kp_u_GROUP_HANDLE; +static PyObject *__pyx_kp_u_GROUP_NAME; +static PyObject *__pyx_kp_u_GROUP_STATUS; +static PyObject *__pyx_kp_u_Handle; +static PyObject *__pyx_kp_u_Handle_2; +static PyObject *__pyx_n_u_ICAFE_CA_OP_CONN_DOWN; +static PyObject *__pyx_n_u_ICAFE_CS_NEVER_CONN; +static PyObject *__pyx_n_u_ICAFE_NORMAL; +static PyObject *__pyx_n_u_ICAFE_TYPENOTCONN; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x8a; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0; +static PyObject *__pyx_n_s_IndexError; +static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte; +static PyObject *__pyx_kp_u_Input_argument_if_given_should_b; +static PyObject *__pyx_kp_u_Input_argument_pv_should_be_of_t; +static PyObject *__pyx_kp_u_Input_argument_should_be_of_type; +static PyObject *__pyx_kp_u_Input_argument_should_be_of_type_2; +static PyObject *__pyx_kp_u_Input_data_whether_within_a_list; +static PyObject *__pyx_kp_u_Invalid_handle_of_type_class_int; +static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr; +static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_o; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_o_2; +static PyObject *__pyx_kp_u_List_input_arguments_should_be_t; +static PyObject *__pyx_kp_u_Member; +static PyObject *__pyx_n_s_MemoryError; +static PyObject *__pyx_n_s_MemoryNanny; +static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x; +static PyObject *__pyx_kp_s_MemoryView_of_r_object; +static PyObject *__pyx_kp_u_No_Members; +static PyObject *__pyx_kp_u_No_of_group_members_is; +static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; +static PyObject *__pyx_kp_u_None; +static PyObject *__pyx_n_b_O; +static PyObject *__pyx_n_s_OrderedDict; +static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a; +static PyObject *__pyx_kp_u_PV; +static PyObject *__pyx_kp_u_PV_2; +static PyObject *__pyx_kp_u_PV_3; +static PyObject *__pyx_n_u_PV_4; +static PyObject *__pyx_kp_u_PY_VERSION_HEX_is; +static PyObject *__pyx_n_s_PickleError; +static PyObject *__pyx_kp_u_Possible_types_are; +static PyObject *__pyx_n_s_PyCafe; +static PyObject *__pyx_kp_u_PyCafe_def_setGroup_Unusual_data; +static PyObject *__pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE; +static PyObject *__pyx_kp_s_PyCafe_pyx; +static PyObject *__pyx_kp_u_PyCafe_pyx; +static PyObject *__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t; +static PyObject *__pyx_kp_u_PyCafe_pyx_getArray_array_type_d; +static PyObject *__pyx_kp_u_Returning_memoryview; +static PyObject *__pyx_n_s_RuntimeError; +static PyObject *__pyx_kp_u_Second_input_argument_if_not_a_l; +static PyObject *__pyx_kp_u_Second_input_argument_should_be; +static PyObject *__pyx_kp_u_Second_input_argument_should_be_2; +static PyObject *__pyx_kp_u_TIMEOUT_in_getGroup_switching_to; +static PyObject *__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to; +static PyObject *__pyx_kp_u_ThandlePVSet_list_member_should; +static PyObject *__pyx_kp_u_The_pv_name_entered_within_list; +static PyObject *__pyx_kp_u_The_value_entered_was; +static PyObject *__pyx_kp_u_Third_input_argument_should_be_o; +static PyObject *__pyx_kp_u_Third_input_argument_should_be_o_2; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_getAsLis; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_getCache; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_get_shou; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_setCompo; +static PyObject *__pyx_kp_u_This_line_in_PyCafe_def_setScala; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_n_u_TypeError; +static PyObject *__pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE; +static PyObject *__pyx_kp_u_UTF_8; +static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; +static PyObject *__pyx_n_s_UnicodeDecodeError; +static PyObject *__pyx_n_s_UnicodeEncodeError; +static PyObject *__pyx_kp_u_Unknow_array_type_in_user_reques; +static PyObject *__pyx_kp_u_Unknown_array_type_in_user_reque; +static PyObject *__pyx_n_s_UserWarning; +static PyObject *__pyx_kp_u_Valid_input_parameters_for_data; +static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_n_s_View_MemoryView; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetActionW; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa; +static PyObject *__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2; +static PyObject *__pyx_kp_u_Warning_from_groupMonitorStart; +static PyObject *__pyx_kp_u_Warning_from_groupMonitorStartW; +static PyObject *__pyx_kp_u_Warning_from_monitorStart_for_h; +static PyObject *__pyx_kp_u__104; +static PyObject *__pyx_kp_u__108; +static PyObject *__pyx_kp_u__111; +static PyObject *__pyx_kp_u__112; +static PyObject *__pyx_kp_u__12; +static PyObject *__pyx_kp_u__130; +static PyObject *__pyx_kp_u__163; +static PyObject *__pyx_kp_u__17; +static PyObject *__pyx_kp_u__25; +static PyObject *__pyx_kp_u__26; +static PyObject *__pyx_kp_u__28; +static PyObject *__pyx_kp_u__40; +static PyObject *__pyx_kp_u__41; +static PyObject *__pyx_kp_u__42; +static PyObject *__pyx_kp_u__43; +static PyObject *__pyx_kp_u__44; +static PyObject *__pyx_kp_u__45; +static PyObject *__pyx_kp_u__47; +static PyObject *__pyx_kp_u__5; +static PyObject *__pyx_kp_u__6; +static PyObject *__pyx_kp_u__7; +static PyObject *__pyx_kp_u_accessRead_d; +static PyObject *__pyx_kp_u_accessWrite_d; +static PyObject *__pyx_kp_u_alarmSeverity; +static PyObject *__pyx_n_s_alarmSeverityAsString; +static PyObject *__pyx_n_s_alarmSeverity_2; +static PyObject *__pyx_kp_u_alarmSeverity_d; +static PyObject *__pyx_kp_u_alarmStatus; +static PyObject *__pyx_n_s_alarmStatusAsString; +static PyObject *__pyx_n_s_alarmStatus_2; +static PyObject *__pyx_kp_u_alarmStatus_d; +static PyObject *__pyx_n_s_allocate_buffer; +static PyObject *__pyx_kp_u_and_thus_assume_a_string; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_n_s_appname; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_array; +static PyObject *__pyx_n_u_array; +static PyObject *__pyx_kp_u_array_array; +static PyObject *__pyx_n_s_art; +static PyObject *__pyx_n_s_asDict; +static PyObject *__pyx_kp_u_as_channel_is_not_connected; +static PyObject *__pyx_n_u_attachContext; +static PyObject *__pyx_n_s_attrib; +static PyObject *__pyx_n_s_base; +static PyObject *__pyx_n_u_bool; +static PyObject *__pyx_n_s_bool8; +static PyObject *__pyx_n_s_bool_2; +static PyObject *__pyx_n_s_byte; +static PyObject *__pyx_n_u_byte; +static PyObject *__pyx_n_s_c; +static PyObject *__pyx_n_u_c; +static PyObject *__pyx_n_s_cMembers; +static PyObject *__pyx_n_s_cName; +static PyObject *__pyx_n_s_c_bool; +static PyObject *__pyx_n_s_c_byte; +static PyObject *__pyx_n_s_c_char; +static PyObject *__pyx_n_s_c_char_p; +static PyObject *__pyx_n_s_c_double; +static PyObject *__pyx_n_s_c_float; +static PyObject *__pyx_n_s_c_int; +static PyObject *__pyx_n_s_c_int16; +static PyObject *__pyx_n_s_c_int32; +static PyObject *__pyx_n_s_c_int64; +static PyObject *__pyx_n_s_c_int8; +static PyObject *__pyx_n_s_c_long; +static PyObject *__pyx_n_s_c_longdouble; +static PyObject *__pyx_n_s_c_longlong; +static PyObject *__pyx_n_s_c_short; +static PyObject *__pyx_n_s_c_size_t; +static PyObject *__pyx_n_s_c_ssize_t; +static PyObject *__pyx_n_s_c_ubyte; +static PyObject *__pyx_n_s_c_uint; +static PyObject *__pyx_n_s_c_uint16; +static PyObject *__pyx_n_s_c_uint32; +static PyObject *__pyx_n_s_c_uint64; +static PyObject *__pyx_n_s_c_uint8; +static PyObject *__pyx_n_s_c_ulong; +static PyObject *__pyx_n_s_c_ulonglong; +static PyObject *__pyx_n_s_c_ushort; +static PyObject *__pyx_n_s_c_void_p; +static PyObject *__pyx_n_s_c_voidp; +static PyObject *__pyx_n_s_c_wchar; +static PyObject *__pyx_n_s_c_wchar_p; +static PyObject *__pyx_kp_u_ca_pend_event_timeout; +static PyObject *__pyx_kp_u_ca_pend_io_timeout; +static PyObject *__pyx_n_s_cache; +static PyObject *__pyx_n_s_cacheFlag; +static PyObject *__pyx_n_u_cafe; +static PyObject *__pyx_kp_u_cafeConnectionState; +static PyObject *__pyx_kp_u_cafeDbrType; +static PyObject *__pyx_n_s_cb; +static PyObject *__pyx_kp_u_channelID_s; +static PyObject *__pyx_n_s_channelInfo; +static PyObject *__pyx_n_s_checkForGroupHandle; +static PyObject *__pyx_n_s_checkForHandle; +static PyObject *__pyx_n_s_checkForHandleList; +static PyObject *__pyx_n_u_cinit; +static PyObject *__pyx_n_s_class; +static PyObject *__pyx_kp_u_className_s; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_u_close; +static PyObject *__pyx_n_u_closeChannelKeepHandle; +static PyObject *__pyx_n_u_closeDisconnectedChannelsWithinG; +static PyObject *__pyx_n_u_closeHandles; +static PyObject *__pyx_n_s_cname; +static PyObject *__pyx_n_s_collections; +static PyObject *__pyx_kp_u_connectFlag_d; +static PyObject *__pyx_kp_u_connectionState; +static PyObject *__pyx_kp_s_contiguous_and_direct; +static PyObject *__pyx_kp_s_contiguous_and_indirect; +static PyObject *__pyx_n_s_copy; +static PyObject *__pyx_n_u_ctype; +static PyObject *__pyx_n_s_ctypes; +static PyObject *__pyx_n_u_ctypes; +static PyObject *__pyx_n_u_d; +static PyObject *__pyx_kp_u_d_2; +static PyObject *__pyx_kp_u_dataType; +static PyObject *__pyx_kp_u_datatype; +static PyObject *__pyx_n_s_dbr; +static PyObject *__pyx_n_s_dbrBase; +static PyObject *__pyx_kp_u_dbrDataType; +static PyObject *__pyx_kp_u_dbr_base_type_should_be_one_of_D; +static PyObject *__pyx_kp_u_dbr_base_type_should_be_one_of_D_2; +static PyObject *__pyx_n_s_decode; +static PyObject *__pyx_kp_u_decode_utf_16_error; +static PyObject *__pyx_n_s_deepcopy; +static PyObject *__pyx_kp_u_def_getScalarArray; +static PyObject *__pyx_kp_u_def_getScalarList; +static PyObject *__pyx_n_s_deltaMS; +static PyObject *__pyx_n_u_devicePositionV; +static PyObject *__pyx_n_s_dict; +static PyObject *__pyx_n_s_dictFlag; +static PyObject *__pyx_kp_u_does_not_match_the_length_of_da; +static PyObject *__pyx_kp_u_does_not_match_the_length_of_da_2; +static PyObject *__pyx_n_s_double; +static PyObject *__pyx_n_u_double; +static PyObject *__pyx_n_s_dt; +static PyObject *__pyx_n_s_dtype; +static PyObject *__pyx_n_s_dtype_is_object; +static PyObject *__pyx_n_s_empty; +static PyObject *__pyx_n_s_encode; +static PyObject *__pyx_kp_u_encode_utf_16_error; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_enumString; +static PyObject *__pyx_kp_u_enumStrings; +static PyObject *__pyx_n_s_enumValue; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_error; +static PyObject *__pyx_n_s_error_code; +static PyObject *__pyx_kp_u_error_code_2; +static PyObject *__pyx_kp_u_error_code_3; +static PyObject *__pyx_n_s_error_info; +static PyObject *__pyx_kp_u_error_info_2; +static PyObject *__pyx_kp_u_error_info_3; +static PyObject *__pyx_n_s_error_text; +static PyObject *__pyx_kp_u_error_text_2; +static PyObject *__pyx_kp_u_error_text_3; +static PyObject *__pyx_n_u_etNelemToRetrieveFromCache; +static PyObject *__pyx_n_s_exceptions; +static PyObject *__pyx_n_u_f; +static PyObject *__pyx_n_s_flags; +static PyObject *__pyx_n_u_float; +static PyObject *__pyx_n_s_float16; +static PyObject *__pyx_n_u_float16; +static PyObject *__pyx_n_s_float32; +static PyObject *__pyx_n_u_float32; +static PyObject *__pyx_n_s_float64; +static PyObject *__pyx_n_u_float64; +static PyObject *__pyx_n_s_float_2; +static PyObject *__pyx_n_u_float_2; +static PyObject *__pyx_n_s_force; +static PyObject *__pyx_n_s_format; +static PyObject *__pyx_n_s_fortran; +static PyObject *__pyx_n_u_fortran; +static PyObject *__pyx_kp_u_freeing_ptr; +static PyObject *__pyx_kp_u_from; +static PyObject *__pyx_n_s_func; +static PyObject *__pyx_n_s_gHandleName; +static PyObject *__pyx_n_s_gName; +static PyObject *__pyx_kp_u_gameSetAndMatch_list_handlePVSet; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_s_getAlarmStatusSeverity; +static PyObject *__pyx_n_s_getArray; +static PyObject *__pyx_n_u_getArray; +static PyObject *__pyx_n_s_getArrayCache; +static PyObject *__pyx_n_u_getArrayCache; +static PyObject *__pyx_n_u_getAsyn; +static PyObject *__pyx_n_s_getCache; +static PyObject *__pyx_kp_u_getCache_handlePV_str_dt_native; +static PyObject *__pyx_n_u_getChannelAttribute; +static PyObject *__pyx_n_u_getChannelDataStore; +static PyObject *__pyx_n_u_getChannelDevice; +static PyObject *__pyx_n_s_getChannelInfo; +static PyObject *__pyx_kp_u_getChannelInfo_handlePV; +static PyObject *__pyx_n_s_getCompoundList; +static PyObject *__pyx_kp_u_getCompoundList_handleList_str_d; +static PyObject *__pyx_n_s_getCompoundPVGroup; +static PyObject *__pyx_kp_u_getCompoundPVGroup_ghandleName_s; +static PyObject *__pyx_n_u_getContext; +static PyObject *__pyx_n_s_getCtrlCache; +static PyObject *__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat; +static PyObject *__pyx_kp_u_getCtrl_handlePV_str_dt_native; +static PyObject *__pyx_n_u_getDataTypeInCallback; +static PyObject *__pyx_n_u_getDataTypeNative; +static PyObject *__pyx_n_u_getDataTypeRequest; +static PyObject *__pyx_n_s_getDbrBase; +static PyObject *__pyx_n_u_getDbrBaseInCallback; +static PyObject *__pyx_n_u_getDbrDataTypeInCallback; +static PyObject *__pyx_n_s_getDescription; +static PyObject *__pyx_kp_u_getDictionary_handleList_dt_cach; +static PyObject *__pyx_n_s_getEnumFromString; +static PyObject *__pyx_n_u_getEnumFromString; +static PyObject *__pyx_n_s_getEnumStrings; +static PyObject *__pyx_n_s_getGroup; +static PyObject *__pyx_kp_u_getGroupCache_self_ghandleName_s; +static PyObject *__pyx_kp_u_getGroup_ghandleName_str_dt_nati; +static PyObject *__pyx_n_s_getHandleFromPV; +static PyObject *__pyx_n_s_getHandleFromPVName; +static PyObject *__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh; +static PyObject *__pyx_n_s_getHandlesFromWithinGroup; +static PyObject *__pyx_n_u_getHandlesFromWithinGroup; +static PyObject *__pyx_n_s_getList; +static PyObject *__pyx_n_u_getList; +static PyObject *__pyx_n_u_getMonitorIDInCallback; +static PyObject *__pyx_n_s_getMonitorIDs; +static PyObject *__pyx_n_s_getMonitorIDsInWaiting; +static PyObject *__pyx_n_s_getNoMonitors; +static PyObject *__pyx_n_s_getNonBlocking; +static PyObject *__pyx_n_s_getPV; +static PyObject *__pyx_n_u_getPV; +static PyObject *__pyx_n_s_getPVCache; +static PyObject *__pyx_kp_u_getPVCache_handlePV_str_dt_nativ; +static PyObject *__pyx_n_s_getPVGroup; +static PyObject *__pyx_n_u_getPVGroupCache; +static PyObject *__pyx_kp_u_getPVGroup_ghandleName_str_dt_na; +static PyObject *__pyx_n_s_getPVList; +static PyObject *__pyx_n_u_getPVList; +static PyObject *__pyx_n_s_getPrecision; +static PyObject *__pyx_kp_u_getScalarArray_handleList_str_dt; +static PyObject *__pyx_n_s_getScalarList; +static PyObject *__pyx_kp_u_getScalarList_handleList_str_dt; +static PyObject *__pyx_n_s_getStatus; +static PyObject *__pyx_n_s_getStringFromEnum; +static PyObject *__pyx_n_u_getStringFromEnum; +static PyObject *__pyx_n_s_getTimeStamp; +static PyObject *__pyx_n_s_getTimeStampAsDate; +static PyObject *__pyx_n_s_getUnits; +static PyObject *__pyx_n_s_getWFAsString; +static PyObject *__pyx_n_u_getWFAsString; +static PyObject *__pyx_kp_u_get_handlePV_dt; +static PyObject *__pyx_n_s_get_wf_express; +static PyObject *__pyx_n_u_get_wf_express; +static PyObject *__pyx_n_s_getstate; +static PyObject *__pyx_n_s_ghandleName; +static PyObject *__pyx_n_s_gname; +static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi; +static PyObject *__pyx_kp_u_groupClose_gHandleName; +static PyObject *__pyx_n_u_groupDefineFromCollection; +static PyObject *__pyx_n_s_groupHandles; +static PyObject *__pyx_kp_u_groupMemberList_self_str_gname; +static PyObject *__pyx_n_s_groupMonitorStart; +static PyObject *__pyx_kp_u_groupMonitorStartWithCBList_ghan; +static PyObject *__pyx_kp_u_groupMonitorStart_ghandleName_cb; +static PyObject *__pyx_kp_u_groupMonitorStop_ghandleName; +static PyObject *__pyx_n_s_groupOpen; +static PyObject *__pyx_kp_u_groupOpen_char_gname; +static PyObject *__pyx_kp_u_grouping_char_gname_list__pvlist; +static PyObject *__pyx_n_u_h; +static PyObject *__pyx_n_s_handle; +static PyObject *__pyx_n_s_handleList; +static PyObject *__pyx_kp_u_handleMatch_list_member_should_b; +static PyObject *__pyx_n_s_handlePV; +static PyObject *__pyx_n_s_handlePVAction; +static PyObject *__pyx_kp_u_handlePVAction_list_member_shoul; +static PyObject *__pyx_n_s_handlePVMatch; +static PyObject *__pyx_n_s_handlePVSet; +static PyObject *__pyx_kp_u_handle_2; +static PyObject *__pyx_kp_u_handle_3; +static PyObject *__pyx_n_s_handle_4; +static PyObject *__pyx_n_s_handlesPV; +static PyObject *__pyx_n_u_has; +static PyObject *__pyx_n_s_hasAlarmStatusSeverity; +static PyObject *__pyx_n_s_hasDescription; +static PyObject *__pyx_kp_u_has_error; +static PyObject *__pyx_kp_u_hence_assuming_DBR_TIME; +static PyObject *__pyx_kp_u_hence_assuming_default_value_GET; +static PyObject *__pyx_kp_u_hence_assuming_default_value_GET_2; +static PyObject *__pyx_n_s_hex; +static PyObject *__pyx_kp_u_hostName_s; +static PyObject *__pyx_n_s_id; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_kp_u_in_PyCafe_def_getCompundList; +static PyObject *__pyx_kp_u_in_PyCafe_def_getScalarArray; +static PyObject *__pyx_kp_u_in_PyCafe_def_getScalarList; +static PyObject *__pyx_n_s_index; +static PyObject *__pyx_n_u_init; +static PyObject *__pyx_n_s_initCallbackComplete; +static PyObject *__pyx_n_u_initCallbackComplete; +static PyObject *__pyx_kp_u_input_argument_timeout_must_be_a; +static PyObject *__pyx_kp_u_input_argument_timeout_must_be_a_2; +static PyObject *__pyx_n_s_inspect; +static PyObject *__pyx_n_u_int; +static PyObject *__pyx_n_s_int16; +static PyObject *__pyx_n_u_int16; +static PyObject *__pyx_n_s_int32; +static PyObject *__pyx_n_u_int32; +static PyObject *__pyx_n_s_int64; +static PyObject *__pyx_n_u_int64; +static PyObject *__pyx_n_s_int8; +static PyObject *__pyx_n_u_int8; +static PyObject *__pyx_n_s_int_2; +static PyObject *__pyx_n_u_int_2; +static PyObject *__pyx_n_s_intc; +static PyObject *__pyx_n_s_intp; +static PyObject *__pyx_n_s_isConnected; +static PyObject *__pyx_n_u_isConnected; +static PyObject *__pyx_n_s_isEnum; +static PyObject *__pyx_n_s_isValid; +static PyObject *__pyx_kp_u_is_not_a_valid_option; +static PyObject *__pyx_n_s_itemsize; +static PyObject *__pyx_kp_s_itemsize_0_for_cython_array; +static PyObject *__pyx_n_s_keepGroupName; +static PyObject *__pyx_n_s_keys; +static PyObject *__pyx_n_s_kwargs; +static PyObject *__pyx_kp_u_latin_1; +static PyObject *__pyx_n_s_longlong; +static PyObject *__pyx_kp_u_lowerAlarmLimit_f; +static PyObject *__pyx_kp_u_lowerControlLimit_f; +static PyObject *__pyx_kp_u_lowerDisplayLimit_f; +static PyObject *__pyx_kp_u_lowerWarningLimit_f; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_kp_u_mask; +static PyObject *__pyx_kp_u_maskHasDBE_ALARM; +static PyObject *__pyx_kp_u_maskHasDBE_LOG; +static PyObject *__pyx_kp_u_maskHasDBE_PROPERTY; +static PyObject *__pyx_kp_u_maskHasDBE_VALUE; +static PyObject *__pyx_n_s_mask_2; +static PyObject *__pyx_kp_u_matchManyWithStatus_list_valSet; +static PyObject *__pyx_kp_u_matchMany_list_valSet_list_handl; +static PyObject *__pyx_kp_u_match_double_valSet_handlePVMatc; +static PyObject *__pyx_kp_u_members_while_group_has; +static PyObject *__pyx_n_s_memoryview; +static PyObject *__pyx_n_u_memoryview; +static PyObject *__pyx_kp_u_memoryview_numpy_array_ctypes; +static PyObject *__pyx_n_u_memoryviewslice; +static PyObject *__pyx_n_u_memoryviewslice_2; +static PyObject *__pyx_n_s_memview; +static PyObject *__pyx_n_s_method; +static PyObject *__pyx_n_s_mode; +static PyObject *__pyx_kp_u_monid; +static PyObject *__pyx_n_s_monid_2; +static PyObject *__pyx_n_s_monid_3; +static PyObject *__pyx_n_s_monitorStart; +static PyObject *__pyx_kp_u_monitorStart_handlePV_object_cb; +static PyObject *__pyx_n_s_monitorStop; +static PyObject *__pyx_kp_u_monitorStopAll; +static PyObject *__pyx_kp_u_monitorStop_handlePV_mpid_None; +static PyObject *__pyx_n_s_monitorpolicy; +static PyObject *__pyx_n_s_mpid; +static PyObject *__pyx_n_u_mv; +static PyObject *__pyx_kp_u_name; +static PyObject *__pyx_kp_u_name_2; +static PyObject *__pyx_n_s_name_3; +static PyObject *__pyx_n_s_name_4; +static PyObject *__pyx_kp_u_nanny_for_ptr; +static PyObject *__pyx_n_u_native; +static PyObject *__pyx_n_s_ndarray; +static PyObject *__pyx_n_u_ndarray; +static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; +static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; +static PyObject *__pyx_n_s_ndim; +static PyObject *__pyx_kp_u_nelem; +static PyObject *__pyx_n_s_nelem_2; +static PyObject *__pyx_kp_u_nelem_d; +static PyObject *__pyx_n_s_netrfc; +static PyObject *__pyx_n_s_new; +static PyObject *__pyx_kp_u_noEnumStrings_d; +static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; +static PyObject *__pyx_kp_u_no_encoding_done; +static PyObject *__pyx_kp_u_not_connected; +static PyObject *__pyx_kp_u_not_recognized; +static PyObject *__pyx_n_s_notify_milliseconds; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_u_np; +static PyObject *__pyx_kp_u_np_bool; +static PyObject *__pyx_kp_u_np_byte; +static PyObject *__pyx_kp_u_np_float; +static PyObject *__pyx_kp_u_np_float16; +static PyObject *__pyx_kp_u_np_float32; +static PyObject *__pyx_kp_u_np_float64; +static PyObject *__pyx_kp_u_np_int; +static PyObject *__pyx_kp_u_np_int16; +static PyObject *__pyx_kp_u_np_int32; +static PyObject *__pyx_kp_u_np_int64; +static PyObject *__pyx_kp_u_np_int8; +static PyObject *__pyx_kp_u_np_intc; +static PyObject *__pyx_kp_u_np_long; +static PyObject *__pyx_kp_u_np_ndarray; +static PyObject *__pyx_kp_u_np_short; +static PyObject *__pyx_kp_u_np_str; +static PyObject *__pyx_kp_u_np_str_2; +static PyObject *__pyx_kp_u_np_string; +static PyObject *__pyx_kp_u_np_string_2; +static PyObject *__pyx_kp_u_np_uint16; +static PyObject *__pyx_kp_u_np_uint32; +static PyObject *__pyx_kp_u_np_uint64; +static PyObject *__pyx_kp_u_np_uint8; +static PyObject *__pyx_kp_u_np_ulong; +static PyObject *__pyx_kp_u_np_unicode; +static PyObject *__pyx_kp_u_np_unicode_2; +static PyObject *__pyx_kp_u_np_ushort; +static PyObject *__pyx_n_s_numbers; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_n_u_numpy; +static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_kp_u_numpy_ndarray; +static PyObject *__pyx_n_s_obj; +static PyObject *__pyx_n_s_open; +static PyObject *__pyx_n_u_open; +static PyObject *__pyx_n_u_openGroupNowAndWaitForInputGroup; +static PyObject *__pyx_n_s_openMonitorNow; +static PyObject *__pyx_kp_u_openMonitorNowAndWait_timeout; +static PyObject *__pyx_n_s_openMonitorPrepare; +static PyObject *__pyx_n_s_openNoWait; +static PyObject *__pyx_n_s_openNowAndWait; +static PyObject *__pyx_n_u_openNowAndWait; +static PyObject *__pyx_n_s_openPrepare; +static PyObject *__pyx_n_s_order; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_pack; +static PyObject *__pyx_n_s_parameters; +static PyObject *__pyx_n_s_pickle; +static PyObject *__pyx_kp_u_precision_d; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_printFlag; +static PyObject *__pyx_n_s_printHandle; +static PyObject *__pyx_n_u_printHandlesV; +static PyObject *__pyx_n_u_printStatusIfError; +static PyObject *__pyx_kp_u_pulseID; +static PyObject *__pyx_n_s_pv; +static PyObject *__pyx_n_s_pvList; +static PyObject *__pyx_n_s_pv_name; +static PyObject *__pyx_n_s_pv_name_2; +static PyObject *__pyx_n_s_pv_value; +static PyObject *__pyx_n_s_pvctrl; +static PyObject *__pyx_n_s_pvdata; +static PyObject *__pyx_n_s_pvgroup; +static PyObject *__pyx_n_s_pvhandleList; +static PyObject *__pyx_n_s_pvlist; +static PyObject *__pyx_n_s_py_cb; +static PyObject *__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha; +static PyObject *__pyx_n_s_pymodule; +static PyObject *__pyx_n_s_pymodule_parts; +static PyObject *__pyx_n_s_python_version; +static PyObject *__pyx_kp_u_pyx; +static PyObject *__pyx_n_s_pyx_PickleError; +static PyObject *__pyx_n_s_pyx_checksum; +static PyObject *__pyx_n_s_pyx_getbuffer; +static PyObject *__pyx_n_s_pyx_result; +static PyObject *__pyx_n_s_pyx_state; +static PyObject *__pyx_n_s_pyx_type; +static PyObject *__pyx_n_s_pyx_unpickle_CafeException; +static PyObject *__pyx_n_s_pyx_unpickle_Enum; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_reduce; +static PyObject *__pyx_n_s_reduce_cython; +static PyObject *__pyx_n_s_reduce_ex; +static PyObject *__pyx_kp_u_reports_the_following_error; +static PyObject *__pyx_kp_u_s; +static PyObject *__pyx_n_s_scalarOnly; +static PyObject *__pyx_n_s_self; +static PyObject *__pyx_kp_s_self_ptr_cannot_be_converted_to; +static PyObject *__pyx_n_s_set; +static PyObject *__pyx_kp_u_setAndMatchMany_list_handlePVSet; +static PyObject *__pyx_kp_u_setAndMatch_handlePVSet_double_v; +static PyObject *__pyx_n_u_setCallbackGet; +static PyObject *__pyx_n_u_setCallbackPut; +static PyObject *__pyx_n_u_setChannelRequestPolicyGet; +static PyObject *__pyx_kp_u_setCompoundList_handleList_list; +static PyObject *__pyx_n_s_setDbrBase; +static PyObject *__pyx_n_s_setGetActionWhenMonitorPolicy; +static PyObject *__pyx_n_s_setGetCacheWaitPolicy; +static PyObject *__pyx_kp_u_setGroup_self_ghandleName_list_v; +static PyObject *__pyx_n_u_setNelem; +static PyObject *__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i; +static PyObject *__pyx_n_u_setNelemToNative; +static PyObject *__pyx_n_u_setNelemToRetrieveFromCacheToOne; +static PyObject *__pyx_n_s_setPyConnectCallbackFn; +static PyObject *__pyx_n_u_setScalarList; +static PyObject *__pyx_kp_u_set_handlePV_valSet; +static PyObject *__pyx_n_s_setstate; +static PyObject *__pyx_n_s_setstate_cython; +static PyObject *__pyx_n_s_shape; +static PyObject *__pyx_n_s_short; +static PyObject *__pyx_n_u_short; +static PyObject *__pyx_n_s_showMax; +static PyObject *__pyx_n_s_signature; +static PyObject *__pyx_n_s_single; +static PyObject *__pyx_n_s_size; +static PyObject *__pyx_n_s_sleep; +static PyObject *__pyx_n_s_source; +static PyObject *__pyx_kp_u_source_2; +static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_start; +static PyObject *__pyx_kp_u_status; +static PyObject *__pyx_n_s_statusAsString; +static PyObject *__pyx_n_s_statusList; +static PyObject *__pyx_kp_u_status_2; +static PyObject *__pyx_n_s_status_3; +static PyObject *__pyx_kp_u_status_4; +static PyObject *__pyx_kp_u_status_d; +static PyObject *__pyx_kp_u_status_from_pxy; +static PyObject *__pyx_n_s_step; +static PyObject *__pyx_n_s_stop; +static PyObject *__pyx_n_u_str; +static PyObject *__pyx_n_s_str_2; +static PyObject *__pyx_n_u_str_2; +static PyObject *__pyx_kp_s_strided_and_direct; +static PyObject *__pyx_kp_s_strided_and_direct_or_indirect; +static PyObject *__pyx_kp_s_strided_and_indirect; +static PyObject *__pyx_n_u_string; +static PyObject *__pyx_n_u_string_2; +static PyObject *__pyx_kp_s_stringsource; +static PyObject *__pyx_n_s_struct; +static PyObject *__pyx_n_s_supplementHandle; +static PyObject *__pyx_n_u_supplementHandles; +static PyObject *__pyx_n_s_supplementHandlesV; +static PyObject *__pyx_n_u_supplementHandlesV; +static PyObject *__pyx_n_s_sys; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_time; +static PyObject *__pyx_n_s_timeit; +static PyObject *__pyx_n_s_timeout; +static PyObject *__pyx_n_s_tolerance; +static PyObject *__pyx_kp_u_ts; +static PyObject *__pyx_kp_u_tsDate; +static PyObject *__pyx_n_s_tsDate_2; +static PyObject *__pyx_n_s_ts_2; +static PyObject *__pyx_n_s_type; +static PyObject *__pyx_kp_u_type_2; +static PyObject *__pyx_n_s_type_3; +static PyObject *__pyx_n_s_ubyte; +static PyObject *__pyx_n_u_uchar; +static PyObject *__pyx_n_s_uint; +static PyObject *__pyx_n_u_uint; +static PyObject *__pyx_n_s_uint16; +static PyObject *__pyx_n_u_uint16; +static PyObject *__pyx_n_s_uint32; +static PyObject *__pyx_n_u_uint32; +static PyObject *__pyx_n_s_uint64; +static PyObject *__pyx_n_u_uint64; +static PyObject *__pyx_n_s_uint8; +static PyObject *__pyx_n_u_uint8; +static PyObject *__pyx_n_s_uintc; +static PyObject *__pyx_n_s_uintp; +static PyObject *__pyx_n_s_ulonglong; +static PyObject *__pyx_kp_s_unable_to_allocate_array_data; +static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str; +static PyObject *__pyx_n_u_unicode; +static PyObject *__pyx_n_s_unicode_2; +static PyObject *__pyx_n_u_unicode_2; +static PyObject *__pyx_kp_u_units_s; +static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; +static PyObject *__pyx_n_s_unpack; +static PyObject *__pyx_n_s_update; +static PyObject *__pyx_n_s_updateMonitorPolicyDeltaMS; +static PyObject *__pyx_kp_u_upperAlarmLimit_f; +static PyObject *__pyx_kp_u_upperControlLimit_f; +static PyObject *__pyx_kp_u_upperDisplayLimit_f; +static PyObject *__pyx_kp_u_upperWarningLimit_f; +static PyObject *__pyx_kp_u_userArgs; +static PyObject *__pyx_n_s_ushort; +static PyObject *__pyx_n_u_ushort; +static PyObject *__pyx_kp_u_utf_16; +static PyObject *__pyx_n_u_utf_16_2; +static PyObject *__pyx_n_u_utf_32; +static PyObject *__pyx_kp_u_utf_8; +static PyObject *__pyx_n_u_utf_8_2; +static PyObject *__pyx_kp_u_utf_none; +static PyObject *__pyx_n_s_valAction; +static PyObject *__pyx_n_s_valList; +static PyObject *__pyx_n_s_valSet; +static PyObject *__pyx_kp_u_value; +static PyObject *__pyx_kp_u_value_2; +static PyObject *__pyx_kp_u_value_3; +static PyObject *__pyx_kp_u_value_4; +static PyObject *__pyx_kp_u_value_5; +static PyObject *__pyx_n_s_value_6; +static PyObject *__pyx_n_s_values; +static PyObject *__pyx_n_s_vectorList; +static PyObject *__pyx_n_s_verify_handlepv; +static PyObject *__pyx_n_s_verify_handlepv_locals_wrapper; +static PyObject *__pyx_n_s_version_info; +static PyObject *__pyx_n_s_wait; +static PyObject *__pyx_kp_u_waitForBundledEvents_self_handle; +static PyObject *__pyx_n_s_waitForGetEvent; +static PyObject *__pyx_n_u_waveform; +static PyObject *__pyx_n_s_when; +static PyObject *__pyx_kp_u_while_list_of_callback_objects; +static PyObject *__pyx_n_s_widget; +static PyObject *__pyx_kp_u_with_error_status; +static PyObject *__pyx_n_s_wmpk; +static PyObject *__pyx_n_s_wpk; +static PyObject *__pyx_n_s_wrapper; +static PyObject *__pyx_n_s_zip; +static void __pyx_pf_6PyCafe_11MemoryNanny___dealloc__(struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11MemoryNanny_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11MemoryNanny_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_4CyCa___cinit__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_4WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_7PENDING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_11channelInfo___cinit__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_2show(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9channelID___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8hostName___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_5nelem___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8dataType___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9className___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_6pvctrl___cinit__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_2show(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_4showMax(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5nelem___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_9precision___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5units___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5value___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6status___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_13CafeException___init__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv_name, PyObject *__pyx_v__error_code, PyObject *__pyx_v__error_text, PyObject *__pyx_v__error_info); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_2show(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4reveal(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4type___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6source___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6handle___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_4name___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_code___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_text___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_info___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_13monitorpolicy___cinit__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_2show(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6status___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata___cinit__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_2show(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_4showMax(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_5nelem___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_2ts___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6tsDate___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_5value___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6status___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_6status_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_7pulseID___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_8dataType___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup___cinit__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_2show(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4showWithPV(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_glist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6showMax(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v__npv); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_3npv___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4name___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4rule___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15verify_handlepv_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_6PyCafe_verify_handlepv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */ +static int __pyx_pf_6PyCafe_6CyCafe___cinit__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static void __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_4get_wf_express(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_6ca_version(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8epics_version_string(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10CAFE_version(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12EPICS_version(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14setPyConnectCallbackFn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_18withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_enable); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20isValid(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22removeWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_24addWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_26getWidgets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_30openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_32openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_34openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_42openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_handlesPV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_44openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_46openGroupNowAndWaitForInputGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_groupHandles); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_52openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_54ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_60ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_62setChannelRequestPolicyGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when, ChannelWaitForResponsePolicyKind __pyx_v_wait, ChannelRequestPolicyKind __pyx_v_method, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_64initCallbackComplete(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_66setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70setTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_78setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_80getSGTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82getSGTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84setSGSelfGoverningTimeout(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_86getContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88attachContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90collectionDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92defineCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_94collectionList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_96collectionMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98devicePositionMap(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_100devicePositionV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_102groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_104getDataTypeNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_106getDataTypeRequest(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_108getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_110getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_112getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_114getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_116getHandlesFromWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_118close(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_120closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_122closeHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_124closeDisconnectedChannelsWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_126closeChannelKeepHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_128reconnect(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_130allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_132isConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134supplementHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_136supplementHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_138supplementHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_140printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_142printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_144printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_146printHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_148printHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_150getDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_152getHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_asDict); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_154getHandleStates(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_156getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_158getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_160getStatusCodeAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_162getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_164getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_166getStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_168getChannelDevice(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_170getChannelAttribute(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_172getDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_174hasDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_176getUnits(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_178getPrecision(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_180hasAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_182getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_184getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_186getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_188checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_190checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_192checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_194getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_196getHandleFromPVName(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_198getPVFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_200getHandleFromPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_202getChannelDataStore(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_204getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_206getChannelList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_listStrings); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_208getWFAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cache); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_210getWFAsStringCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_212isEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_214getEnumStrings(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_216getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_218getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned short __pyx_v_enumValue); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_220setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_222getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_234getStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_236getInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_238getFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_240caget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_242caput(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_pv_value); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244get(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_246getIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_248getFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_250getStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_252getList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_254getStrArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_256getIntArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_258getFloatArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_260getArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_262getPVInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_264getPVFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_266getPVStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_268getPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_270getPVStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_272getPVIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_276getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_statusList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_280getAsyn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_286getScalarArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_294getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, CYTHON_UNUSED PyObject *__pyx_v_dictFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_296getDictionary(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvhandleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, PyObject *__pyx_v_scalarOnly); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_298getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_302getStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_304getIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_306getFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_308getCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316getArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_324getPVCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_326getCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v__monid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_334groupMonitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_342getGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_344getGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_348getGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_350getGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_358getPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_364groupMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_366grouping(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gname, char const *__pyx_v_cname, PyObject *__pyx_v_attrib); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_370groupDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_372defineGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_374groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_376groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName, int __pyx_v_keepGroupName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_378isGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_380isCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_384getMonitorIDsInWaiting(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_386getMonitorIDs(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_388updateMonitorPolicyDeltaMS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_monid, unsigned int __pyx_v_deltaMS); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_390monitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_392monitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned int __pyx_v_nelem, unsigned short __pyx_v_notify_milliseconds); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_394monitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_mpid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_396monitorStopAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_398set(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_valSet); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_400setScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_valList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_402setCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_404setGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_406gameSetAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVAction, PyObject *__pyx_v_valAction, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_408setAndMatchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_410setAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_412matchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_414matchManyWithStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_416match(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_418setNelemCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_420setNelem(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_422setNelemToNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_424setNelemToRetrieveFromCacheToOne(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_426setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_netrfc); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_428terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_430__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_432__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */ +static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */ +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */ +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_6PyCafe_MemoryNanny(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_CyCa(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_channelInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvctrl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_CafeException(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_monitorpolicy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvdata(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_pvgroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe_CyCafe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0}; +static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0}; +static PyObject *__pyx_float_0_1; +static PyObject *__pyx_float_0_2; +static PyObject *__pyx_float_0_01; +static PyObject *__pyx_float_0_02; +static PyObject *__pyx_float_0_05; +static PyObject *__pyx_float_0_001; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_6; +static PyObject *__pyx_int_40; +static PyObject *__pyx_int_50792432; +static PyObject *__pyx_int_145648516; +static PyObject *__pyx_int_184977713; +static PyObject *__pyx_int_neg_1; +static DBR_TYPE __pyx_k__94; +static unsigned int __pyx_k__95; +static DBR_TYPE __pyx_k__96; +static unsigned int __pyx_k__97; +static DBR_TYPE __pyx_k__100; +static unsigned int __pyx_k__101; +static DBR_TYPE __pyx_k__113; +static unsigned int __pyx_k__114; +static DBR_TYPE __pyx_k__115; +static unsigned int __pyx_k__116; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__18; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__22; +static PyObject *__pyx_tuple__23; +static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__27; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__32; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__34; +static PyObject *__pyx_tuple__36; +static PyObject *__pyx_tuple__37; +static PyObject *__pyx_tuple__38; +static PyObject *__pyx_tuple__39; +static PyObject *__pyx_tuple__46; +static PyObject *__pyx_tuple__48; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__50; +static PyObject *__pyx_tuple__51; +static PyObject *__pyx_tuple__52; +static PyObject *__pyx_tuple__53; +static PyObject *__pyx_tuple__54; +static PyObject *__pyx_tuple__55; +static PyObject *__pyx_tuple__56; +static PyObject *__pyx_tuple__57; +static PyObject *__pyx_tuple__58; +static PyObject *__pyx_tuple__59; +static PyObject *__pyx_tuple__60; +static PyObject *__pyx_tuple__61; +static PyObject *__pyx_tuple__62; +static PyObject *__pyx_tuple__63; +static PyObject *__pyx_tuple__64; +static PyObject *__pyx_tuple__65; +static PyObject *__pyx_tuple__66; +static PyObject *__pyx_tuple__67; +static PyObject *__pyx_tuple__68; +static PyObject *__pyx_tuple__69; +static PyObject *__pyx_tuple__70; +static PyObject *__pyx_tuple__71; +static PyObject *__pyx_tuple__72; +static PyObject *__pyx_tuple__73; +static PyObject *__pyx_tuple__74; +static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__76; +static PyObject *__pyx_tuple__77; +static PyObject *__pyx_tuple__78; +static PyObject *__pyx_tuple__79; +static PyObject *__pyx_tuple__80; +static PyObject *__pyx_tuple__81; +static PyObject *__pyx_tuple__82; +static PyObject *__pyx_tuple__83; +static PyObject *__pyx_tuple__84; +static PyObject *__pyx_tuple__85; +static PyObject *__pyx_tuple__86; +static PyObject *__pyx_tuple__87; +static PyObject *__pyx_tuple__88; +static PyObject *__pyx_tuple__89; +static PyObject *__pyx_tuple__90; +static PyObject *__pyx_tuple__91; +static PyObject *__pyx_tuple__92; +static PyObject *__pyx_tuple__93; +static PyObject *__pyx_tuple__98; +static PyObject *__pyx_tuple__99; +static PyObject *__pyx_slice__159; +static PyObject *__pyx_tuple__102; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__106; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__109; +static PyObject *__pyx_tuple__110; +static PyObject *__pyx_tuple__117; +static PyObject *__pyx_tuple__118; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__120; +static PyObject *__pyx_tuple__121; +static PyObject *__pyx_tuple__122; +static PyObject *__pyx_tuple__123; +static PyObject *__pyx_tuple__124; +static PyObject *__pyx_tuple__125; +static PyObject *__pyx_tuple__126; +static PyObject *__pyx_tuple__127; +static PyObject *__pyx_tuple__128; +static PyObject *__pyx_tuple__129; +static PyObject *__pyx_tuple__131; +static PyObject *__pyx_tuple__132; +static PyObject *__pyx_tuple__133; +static PyObject *__pyx_tuple__134; +static PyObject *__pyx_tuple__135; +static PyObject *__pyx_tuple__136; +static PyObject *__pyx_tuple__137; +static PyObject *__pyx_tuple__138; +static PyObject *__pyx_tuple__139; +static PyObject *__pyx_tuple__140; +static PyObject *__pyx_tuple__141; +static PyObject *__pyx_tuple__142; +static PyObject *__pyx_tuple__143; +static PyObject *__pyx_tuple__144; +static PyObject *__pyx_tuple__145; +static PyObject *__pyx_tuple__146; +static PyObject *__pyx_tuple__147; +static PyObject *__pyx_tuple__148; +static PyObject *__pyx_tuple__149; +static PyObject *__pyx_tuple__150; +static PyObject *__pyx_tuple__151; +static PyObject *__pyx_tuple__152; +static PyObject *__pyx_tuple__153; +static PyObject *__pyx_tuple__154; +static PyObject *__pyx_tuple__155; +static PyObject *__pyx_tuple__156; +static PyObject *__pyx_tuple__157; +static PyObject *__pyx_tuple__158; +static PyObject *__pyx_tuple__160; +static PyObject *__pyx_tuple__161; +static PyObject *__pyx_tuple__162; +static PyObject *__pyx_tuple__164; +static PyObject *__pyx_tuple__165; +static PyObject *__pyx_tuple__167; +static PyObject *__pyx_tuple__169; +static PyObject *__pyx_tuple__170; +static PyObject *__pyx_tuple__171; +static PyObject *__pyx_tuple__172; +static PyObject *__pyx_tuple__173; +static PyObject *__pyx_tuple__174; +static PyObject *__pyx_codeobj__35; +static PyObject *__pyx_codeobj__166; +static PyObject *__pyx_codeobj__168; +static PyObject *__pyx_codeobj__175; +/* Late includes */ + +/* "PyCafe.pyx":61 + * cdef class MemoryNanny: + * cdef void* ptr # set to NULL by "constructor" + * def __dealloc__(self): # <<<<<<<<<<<<<< + * print("freeing ptr=", (self.ptr)) #just for debugging + * free(self.ptr) + */ + +/* Python wrapper */ +static void __pyx_pw_6PyCafe_11MemoryNanny_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6PyCafe_11MemoryNanny_1__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6PyCafe_11MemoryNanny___dealloc__(((struct __pyx_obj_6PyCafe_MemoryNanny *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_6PyCafe_11MemoryNanny___dealloc__(struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "PyCafe.pyx":62 + * cdef void* ptr # set to NULL by "constructor" + * def __dealloc__(self): + * print("freeing ptr=", (self.ptr)) #just for debugging # <<<<<<<<<<<<<< + * free(self.ptr) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)__pyx_v_self->ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_freeing_ptr); + __Pyx_GIVEREF(__pyx_kp_u_freeing_ptr); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_freeing_ptr); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":63 + * def __dealloc__(self): + * print("freeing ptr=", (self.ptr)) #just for debugging + * free(self.ptr) # <<<<<<<<<<<<<< + * + * @staticmethod + */ + free(__pyx_v_self->ptr); + + /* "PyCafe.pyx":61 + * cdef class MemoryNanny: + * cdef void* ptr # set to NULL by "constructor" + * def __dealloc__(self): # <<<<<<<<<<<<<< + * print("freeing ptr=", (self.ptr)) #just for debugging + * free(self.ptr) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_WriteUnraisable("PyCafe.MemoryNanny.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafe.pyx":66 + * + * @staticmethod + * cdef create(void* ptr): # <<<<<<<<<<<<<< + * cdef MemoryNanny result = MemoryNanny() + * result.ptr = ptr + */ + +static PyObject *__pyx_f_6PyCafe_11MemoryNanny_create(void *__pyx_v_ptr) { + struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("create", 0); + + /* "PyCafe.pyx":67 + * @staticmethod + * cdef create(void* ptr): + * cdef MemoryNanny result = MemoryNanny() # <<<<<<<<<<<<<< + * result.ptr = ptr + * print("nanny for ptr=", (result.ptr)) #just for debugging + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_MemoryNanny)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_result = ((struct __pyx_obj_6PyCafe_MemoryNanny *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":68 + * cdef create(void* ptr): + * cdef MemoryNanny result = MemoryNanny() + * result.ptr = ptr # <<<<<<<<<<<<<< + * print("nanny for ptr=", (result.ptr)) #just for debugging + * return result + */ + __pyx_v_result->ptr = __pyx_v_ptr; + + /* "PyCafe.pyx":69 + * cdef MemoryNanny result = MemoryNanny() + * result.ptr = ptr + * print("nanny for ptr=", (result.ptr)) #just for debugging # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)__pyx_v_result->ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_nanny_for_ptr); + __Pyx_GIVEREF(__pyx_kp_u_nanny_for_ptr); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_nanny_for_ptr); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":70 + * result.ptr = ptr + * print("nanny for ptr=", (result.ptr)) #just for debugging + * return result # <<<<<<<<<<<<<< + * + * cdef extern from "numpy/arrayobject.h": + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "PyCafe.pyx":66 + * + * @staticmethod + * cdef create(void* ptr): # <<<<<<<<<<<<<< + * cdef MemoryNanny result = MemoryNanny() + * result.ptr = ptr + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.MemoryNanny.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11MemoryNanny_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11MemoryNanny_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11MemoryNanny_2__reduce_cython__(((struct __pyx_obj_6PyCafe_MemoryNanny *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11MemoryNanny_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.MemoryNanny.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11MemoryNanny_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11MemoryNanny_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11MemoryNanny_4__setstate_cython__(((struct __pyx_obj_6PyCafe_MemoryNanny *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11MemoryNanny_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_MemoryNanny *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.MemoryNanny.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":77 + * int PyArray_SetBaseObject(cnp.ndarray arr, PyObject *obj) except -1 # -1 means there was an error + * + * cdef array_from_ptr(void * ptr, cnp.npy_intp N, int np_type): # <<<<<<<<<<<<<< + * #start = time.time() + * cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr) + */ + +static PyObject *__pyx_f_6PyCafe_array_from_ptr(void *__pyx_v_ptr, npy_intp __pyx_v_N, int __pyx_v_np_type) { + PyArrayObject *__pyx_v_arr = 0; + PyObject *__pyx_v_nanny = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + __Pyx_RefNannySetupContext("array_from_ptr", 0); + + /* "PyCafe.pyx":79 + * cdef array_from_ptr(void * ptr, cnp.npy_intp N, int np_type): + * #start = time.time() + * cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr) # <<<<<<<<<<<<<< + * nanny = MemoryNanny.create(ptr) + * Py_INCREF(nanny) # a reference will get stolen, so prepare nanny + */ + __pyx_t_1 = PyArray_SimpleNewFromData(1, (&__pyx_v_N), __pyx_v_np_type, __pyx_v_ptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_v_arr = ((PyArrayObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":80 + * #start = time.time() + * cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr) + * nanny = MemoryNanny.create(ptr) # <<<<<<<<<<<<<< + * Py_INCREF(nanny) # a reference will get stolen, so prepare nanny + * PyArray_SetBaseObject(arr, nanny) + */ + __pyx_t_1 = __pyx_f_6PyCafe_11MemoryNanny_create(__pyx_v_ptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_nanny = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":81 + * cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr) + * nanny = MemoryNanny.create(ptr) + * Py_INCREF(nanny) # a reference will get stolen, so prepare nanny # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, nanny) + * #print("array_from_ptr", time.time() - start) + */ + Py_INCREF(__pyx_v_nanny); + + /* "PyCafe.pyx":82 + * nanny = MemoryNanny.create(ptr) + * Py_INCREF(nanny) # a reference will get stolen, so prepare nanny + * PyArray_SetBaseObject(arr, nanny) # <<<<<<<<<<<<<< + * #print("array_from_ptr", time.time() - start) + * return arr + */ + __pyx_t_2 = PyArray_SetBaseObject(__pyx_v_arr, ((PyObject *)__pyx_v_nanny)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 82, __pyx_L1_error) + + /* "PyCafe.pyx":84 + * PyArray_SetBaseObject(arr, nanny) + * #print("array_from_ptr", time.time() - start) + * return arr # <<<<<<<<<<<<<< + * + * include "PyCafeDefs.pxi" + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr)); + __pyx_r = ((PyObject *)__pyx_v_arr); + goto __pyx_L0; + + /* "PyCafe.pyx":77 + * int PyArray_SetBaseObject(cnp.ndarray arr, PyObject *obj) except -1 # -1 means there was an error + * + * cdef array_from_ptr(void * ptr, cnp.npy_intp N, int np_type): # <<<<<<<<<<<<<< + * #start = time.time() + * cdef cnp.ndarray arr = cnp.PyArray_SimpleNewFromData(1, &N, np_type, ptr) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.array_from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_arr); + __Pyx_XDECREF(__pyx_v_nanny); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs_pub.pxi":11 + * + * + * cdef public void cy_monitor_handler_wrapper(void * callback) with gil: # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * cbobjt() + */ + +void cy_monitor_handler_wrapper(void *__pyx_v_callback) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_monitor_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":12 + * + * cdef public void cy_monitor_handler_wrapper(void * callback) with gil: + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * cbobjt() + * with nogil: + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":13 + * cdef public void cy_monitor_handler_wrapper(void * callback) with gil: + * cbobjt= ( callback) + * cbobjt() # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_2 = __pyx_v_cbobjt; __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":14 + * cbobjt= ( callback) + * cbobjt() + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":15 + * cbobjt() + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":14 + * cbobjt= ( callback) + * cbobjt() + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":11 + * + * + * cdef public void cy_monitor_handler_wrapper(void * callback) with gil: # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * cbobjt() + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("PyCafe.cy_monitor_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":18 + * + * + * cdef public void cy_data_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +void cy_data_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVDataHolder __pyx_v_pvd) { + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_data = 0; + HandleHelper __pyx_v_hh; + CYTHON_UNUSED unsigned int __pyx_v_mpid; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_data_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":25 + * global py_cb + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname) + * cdef pvdata data = PVDataHolderToStruct(pvd) # <<<<<<<<<<<<<< + * #data.show() + * py_cb = ( callback) + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":27 + * cdef pvdata data = PVDataHolderToStruct(pvd) + * #data.show() + * py_cb = ( callback) # <<<<<<<<<<<<<< + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname) + * cdef HandleHelper hh + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_cb, __pyx_t_1) < 0) __PYX_ERR(3, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":30 + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname) + * cdef HandleHelper hh + * mpid = hh.getUsrArgsAsUInt(handle) # <<<<<<<<<<<<<< + * #print("monitorId", mpid) + * #monDictGlobal[mpid](handle, pvname, data) + */ + __pyx_v_mpid = __pyx_v_hh.getUsrArgsAsUInt(__pyx_v_handle); + + /* "PyCafeDefs_pub.pxi":33 + * #print("monitorId", mpid) + * #monDictGlobal[mpid](handle, pvname, data) + * py_cb(handle, pvname, data) # <<<<<<<<<<<<<< + * + * #if monDictGlobal[mpid] != py_cb: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_py_cb); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_v_data)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data)); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (void)(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":39 + * # print( py_cb) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":40 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":39 + * # print( py_cb) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":18 + * + * + * cdef public void cy_data_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.cy_data_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_data); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":43 + * + * + * cdef public void cy_ctrl_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +void cy_ctrl_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, PVCtrlHolder __pyx_v_pvc) { + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_data = 0; + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_ctrl_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":49 + * + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_data = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":50 + * #print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname) + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * cbobjt(handle, pvname, data) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":51 + * cdef pvctrl data = PVCtrlHolderToStruct(pvc) + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_data)}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_data)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_data)); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, ((PyObject *)__pyx_v_data)); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":52 + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":53 + * cbobjt(handle, pvname, data) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":52 + * cbobjt= ( callback) + * cbobjt(handle, pvname, data) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":43 + * + * + * cdef public void cy_ctrl_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.cy_ctrl_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_data); + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":56 + * + * + * cdef public void cy_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname) with gil: + */ + +void cy_event_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_event_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":61 + * #print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname) + * #(args[0])(args[1], args[2]) + * cbobjt= callback # <<<<<<<<<<<<<< + * #cbobjt=args[0] + * cbobjt(handle, pvname) + */ + __pyx_t_1 = ((PyObject *)__pyx_v_callback); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":63 + * cbobjt= callback + * #cbobjt=args[0] + * cbobjt(handle, pvname) # <<<<<<<<<<<<<< + * #cbobjt=(args[0], pvname) + * + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_4 = __pyx_v_cbobjt; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":66 + * #cbobjt=(args[0], pvname) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":67 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void cy_handle_handler_wrapper(void * callback, + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":66 + * #cbobjt=(args[0], pvname) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":56 + * + * + * cdef public void cy_event_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname) with gil: + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("PyCafe.cy_event_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":69 + * return + * + * cdef public void cy_handle_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle) with gil: + * #print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle) + */ + +void cy_handle_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_handle_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":73 + * #print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle) + * + * cbobjt= callback # <<<<<<<<<<<<<< + * cbobjt(handle) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)__pyx_v_callback); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":74 + * + * cbobjt= callback + * cbobjt(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":75 + * cbobjt= callback + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":76 + * cbobjt(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef public void cy_connect_handler_wrapper(void * callback, + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":75 + * cbobjt= callback + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":69 + * return + * + * cdef public void cy_handle_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle) with gil: + * #print(" cy_handle_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle:", handle) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("PyCafe.cy_handle_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":78 + * return + * + * cdef public void cy_connect_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + +void cy_connect_handler_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle, std::string __pyx_v_pvname, int __pyx_v_status) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_connect_handler_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":85 + * #print(" callback is ", callback) + * + * if callback: # <<<<<<<<<<<<<< + * cbobjt= callback + * cbobjt(handle, pvname, status) + */ + __pyx_t_1 = (__pyx_v_callback != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs_pub.pxi":86 + * + * if callback: + * cbobjt= callback # <<<<<<<<<<<<<< + * cbobjt(handle, pvname, status) + * + */ + __pyx_t_2 = ((PyObject *)__pyx_v_callback); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_cbobjt = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":87 + * if callback: + * cbobjt= callback + * cbobjt(handle, pvname, status) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvname); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_6 = __pyx_v_cbobjt; __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs_pub.pxi":85 + * #print(" callback is ", callback) + * + * if callback: # <<<<<<<<<<<<<< + * cbobjt= callback + * cbobjt(handle, pvname, status) + */ + } + + /* "PyCafeDefs_pub.pxi":89 + * cbobjt(handle, pvname, status) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":90 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs_pub.pxi":89 + * cbobjt(handle, pvname, status) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs_pub.pxi":78 + * return + * + * cdef public void cy_connect_handler_wrapper(void * callback, # <<<<<<<<<<<<<< + * unsigned int handle, + * string pvname, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_WriteUnraisable("PyCafe.cy_connect_handler_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":93 + * + * + * cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle) + * cbobjt= ( callback) + */ + +void cy_cb_handle_get_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_cb_handle_get_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":94 + * + * cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil: + * print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle) # <<<<<<<<<<<<<< + * cbobjt= ( callback) + * cbobjt(handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); + __Pyx_GIVEREF(__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":95 + * cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil: + * print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle) + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * cbobjt(handle) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":96 + * print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle) + * cbobjt= ( callback) + * cbobjt(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":97 + * cbobjt= ( callback) + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":98 + * cbobjt(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":97 + * cbobjt= ( callback) + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":93 + * + * + * cdef public void cy_cb_handle_get_wrapper(void * callback, unsigned int handle) with gil: # <<<<<<<<<<<<<< + * print(" py_cb_handle_get_wrapper+++++++++++++GET++++++++++= Handle:", handle) + * cbobjt= ( callback) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("PyCafe.cy_cb_handle_get_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs_pub.pxi":101 + * + * + * cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle) + * cbobjt= ( callback) + */ + +void cy_cb_handle_put_wrapper(void *__pyx_v_callback, unsigned int __pyx_v_handle) { + PyObject *__pyx_v_cbobjt = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("cy_cb_handle_put_wrapper", 0); + + /* "PyCafeDefs_pub.pxi":103 + * cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil: + * #print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle) + * cbobjt= ( callback) # <<<<<<<<<<<<<< + * cbobjt(handle) + * with nogil: + */ + __pyx_t_1 = ((PyObject *)((void *)__pyx_v_callback)); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_cbobjt = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":104 + * #print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle) + * cbobjt= ( callback) + * cbobjt(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_3 = __pyx_v_cbobjt; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs_pub.pxi":105 + * cbobjt= ( callback) + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafeDefs_pub.pxi":106 + * cbobjt(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs_pub.pxi":105 + * cbobjt= ( callback) + * cbobjt(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs_pub.pxi":101 + * + * + * cdef public void cy_cb_handle_put_wrapper(void * callback, unsigned int handle) with gil: # <<<<<<<<<<<<<< + * #print(" py_cb_handle_put_wrapper+++++++++++++PUT++++++++++= Handle:", handle) + * cbobjt= ( callback) + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("PyCafe.cy_cb_handle_put_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":350 + * cdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_4CyCa_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_4CyCa_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_4CyCa___cinit__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_4CyCa___cinit__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":353 + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + * self.CY_ECA_NORMAL = ECA_NORMAL # <<<<<<<<<<<<<< + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE + */ + __pyx_v_self->CY_ECA_NORMAL = ECA_NORMAL; + + /* "PyCafeDefs.pxi":354 + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + * self.CY_ECA_NORMAL = ECA_NORMAL + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM # <<<<<<<<<<<<<< + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + */ + __pyx_v_self->CY_ECA_ALLOCMEM = ECA_ALLOCMEM; + + /* "PyCafeDefs.pxi":355 + * self.CY_ECA_NORMAL = ECA_NORMAL + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE # <<<<<<<<<<<<<< + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE + */ + __pyx_v_self->CY_ECA_TOLARGE = ECA_TOLARGE; + + /* "PyCafeDefs.pxi":356 + * self.CY_ECA_ALLOCMEM = ECA_ALLOCMEM + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT # <<<<<<<<<<<<<< + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL + */ + __pyx_v_self->CY_ECA_TIMEOUT = ECA_TIMEOUT; + + /* "PyCafeDefs.pxi":357 + * self.CY_ECA_TOLARGE = ECA_TOLARGE + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE # <<<<<<<<<<<<<< + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL + */ + __pyx_v_self->CY_ECA_BADTYPE = ECA_BADTYPE; + + /* "PyCafeDefs.pxi":358 + * self.CY_ECA_TIMEOUT = ECA_TIMEOUT + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL # <<<<<<<<<<<<<< + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + */ + __pyx_v_self->CY_ECA_INTERNAL = ECA_INTERNAL; + + /* "PyCafeDefs.pxi":359 + * self.CY_ECA_BADTYPE = ECA_BADTYPE + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL # <<<<<<<<<<<<<< + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + */ + __pyx_v_self->CY_ECA_GETFAIL = ECA_GETFAIL; + + /* "PyCafeDefs.pxi":360 + * self.CY_ECA_INTERNAL = ECA_INTERNAL + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL # <<<<<<<<<<<<<< + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR + */ + __pyx_v_self->CY_ECA_PUTFAIL = ECA_PUTFAIL; + + /* "PyCafeDefs.pxi":361 + * self.CY_ECA_GETFAIL = ECA_GETFAIL + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT # <<<<<<<<<<<<<< + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN + */ + __pyx_v_self->CY_ECA_BADCOUNT = ECA_BADCOUNT; + + /* "PyCafeDefs.pxi":362 + * self.CY_ECA_PUTFAIL = ECA_PUTFAIL + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR # <<<<<<<<<<<<<< + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + */ + __pyx_v_self->CY_ECA_BADSTR = ECA_BADSTR; + + /* "PyCafeDefs.pxi":363 + * self.CY_ECA_BADCOUNT = ECA_BADCOUNT + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN # <<<<<<<<<<<<<< + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + */ + __pyx_v_self->CY_ECA_DISCONN = ECA_DISCONN; + + /* "PyCafeDefs.pxi":364 + * self.CY_ECA_BADSTR = ECA_BADSTR + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL # <<<<<<<<<<<<<< + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID + */ + __pyx_v_self->CY_ECA_DBLCHNL = ECA_DBLCHNL; + + /* "PyCafeDefs.pxi":365 + * self.CY_ECA_DISCONN = ECA_DISCONN + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW # <<<<<<<<<<<<<< + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK + */ + __pyx_v_self->CY_ECA_EVDISALLOW = ECA_EVDISALLOW; + + /* "PyCafeDefs.pxi":366 + * self.CY_ECA_DBLCHNL = ECA_DBLCHNL + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID # <<<<<<<<<<<<<< + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE + */ + __pyx_v_self->CY_ECA_BADMONID = ECA_BADMONID; + + /* "PyCafeDefs.pxi":367 + * self.CY_ECA_EVDISALLOW = ECA_EVDISALLOW + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK # <<<<<<<<<<<<<< + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + */ + __pyx_v_self->CY_ECA_BADMASK = ECA_BADMASK; + + /* "PyCafeDefs.pxi":368 + * self.CY_ECA_BADMONID = ECA_BADMONID + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE # <<<<<<<<<<<<<< + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + */ + __pyx_v_self->CY_ECA_IODONE = ECA_IODONE; + + /* "PyCafeDefs.pxi":369 + * self.CY_ECA_BADMASK = ECA_BADMASK + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS # <<<<<<<<<<<<<< + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + */ + __pyx_v_self->CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS; + + /* "PyCafeDefs.pxi":370 + * self.CY_ECA_IODONE = ECA_IODONE + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP # <<<<<<<<<<<<<< + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + */ + __pyx_v_self->CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP; + + /* "PyCafeDefs.pxi":371 + * self.CY_ECA_IOINPROGRESS = ECA_IOINPROGRESS + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG # <<<<<<<<<<<<<< + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + */ + __pyx_v_self->CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG; + + /* "PyCafeDefs.pxi":372 + * self.CY_ECA_BADSYNCGRP = ECA_BADSYNCGRP + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS # <<<<<<<<<<<<<< + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + */ + __pyx_v_self->CY_ECA_NORDACCESS = ECA_NORDACCESS; + + /* "PyCafeDefs.pxi":373 + * self.CY_ECA_PUTCBINPROG = ECA_PUTCBINPROG + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS # <<<<<<<<<<<<<< + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + */ + __pyx_v_self->CY_ECA_NOWTACCESS = ECA_NOWTACCESS; + + /* "PyCafeDefs.pxi":374 + * self.CY_ECA_NORDACCESS = ECA_NORDACCESS + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM # <<<<<<<<<<<<<< + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + */ + __pyx_v_self->CY_ECA_ANACHRONISM = ECA_ANACHRONISM; + + /* "PyCafeDefs.pxi":375 + * self.CY_ECA_NOWTACCESS = ECA_NOWTACCESS + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR # <<<<<<<<<<<<<< + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID + */ + __pyx_v_self->CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR; + + /* "PyCafeDefs.pxi":376 + * self.CY_ECA_ANACHRONISM = ECA_ANACHRONISM + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT # <<<<<<<<<<<<<< + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + */ + __pyx_v_self->CY_ECA_NOCONVERT = ECA_NOCONVERT; + + /* "PyCafeDefs.pxi":377 + * self.CY_ECA_NOSEARCHADDR = ECA_NOSEARCHADDR + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID # <<<<<<<<<<<<<< + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + */ + __pyx_v_self->CY_ECA_BADCHID = ECA_BADCHID; + + /* "PyCafeDefs.pxi":378 + * self.CY_ECA_NOCONVERT = ECA_NOCONVERT + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR # <<<<<<<<<<<<<< + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + */ + __pyx_v_self->CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR; + + /* "PyCafeDefs.pxi":379 + * self.CY_ECA_BADCHID = ECA_BADCHID + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED # <<<<<<<<<<<<<< + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + */ + __pyx_v_self->CY_ECA_ISATTACHED = ECA_ISATTACHED; + + /* "PyCafeDefs.pxi":380 + * self.CY_ECA_BADFUNCPTR = ECA_BADFUNCPTR + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV # <<<<<<<<<<<<<< + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + */ + __pyx_v_self->CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV; + + /* "PyCafeDefs.pxi":381 + * self.CY_ECA_ISATTACHED = ECA_ISATTACHED + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY # <<<<<<<<<<<<<< + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + */ + __pyx_v_self->CY_ECA_CHANDESTROY = ECA_CHANDESTROY; + + /* "PyCafeDefs.pxi":382 + * self.CY_ECA_UNAVAILINSERV = ECA_UNAVAILINSERV + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY # <<<<<<<<<<<<<< + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + */ + __pyx_v_self->CY_ECA_BADPRIORITY = ECA_BADPRIORITY; + + /* "PyCafeDefs.pxi":383 + * self.CY_ECA_CHANDESTROY = ECA_CHANDESTROY + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED # <<<<<<<<<<<<<< + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + */ + __pyx_v_self->CY_ECA_NOTTHREADED = ECA_NOTTHREADED; + + /* "PyCafeDefs.pxi":384 + * self.CY_ECA_BADPRIORITY = ECA_BADPRIORITY + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT # <<<<<<<<<<<<<< + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + */ + __pyx_v_self->CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT; + + /* "PyCafeDefs.pxi":385 + * self.CY_ECA_NOTTHREADED = ECA_NOTTHREADED + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO # <<<<<<<<<<<<<< + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + * + */ + __pyx_v_self->CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO; + + /* "PyCafeDefs.pxi":386 + * self.CY_ECA_16KARRAYCLIENT = ECA_16KARRAYCLIENT + * self.CY_ECA_CONNSEQTMO = ECA_CONNSEQTMO + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO # <<<<<<<<<<<<<< + * + * self.ICAFE_NORMAL = ICAFE_NORMAL + */ + __pyx_v_self->CY_ECA_UNRESPTMO = ECA_UNRESPTMO; + + /* "PyCafeDefs.pxi":388 + * self.CY_ECA_UNRESPTMO = ECA_UNRESPTMO + * + * self.ICAFE_NORMAL = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.ICAFE_SUCCESS = ICAFE_SUCCESS + * + */ + __pyx_v_self->ICAFE_NORMAL = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":389 + * + * self.ICAFE_NORMAL = ICAFE_NORMAL + * self.ICAFE_SUCCESS = ICAFE_SUCCESS # <<<<<<<<<<<<<< + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + */ + __pyx_v_self->ICAFE_SUCCESS = ICAFE_SUCCESS; + + /* "PyCafeDefs.pxi":391 + * self.ICAFE_SUCCESS = ICAFE_SUCCESS + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + */ + __pyx_v_self->ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN; + + /* "PyCafeDefs.pxi":392 + * + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + */ + __pyx_v_self->ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN; + + /* "PyCafeDefs.pxi":393 + * self.ICAFE_CS_NEVER_CONN = ICAFE_CS_NEVER_CONN + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + */ + __pyx_v_self->ICAFE_CS_CONN = ICAFE_CS_CONN; + + /* "PyCafeDefs.pxi":394 + * self.ICAFE_CS_PREV_CONN = ICAFE_CS_PREV_CONN + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED # <<<<<<<<<<<<<< + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + */ + __pyx_v_self->ICAFE_CS_CLOSED = ICAFE_CS_CLOSED; + + /* "PyCafeDefs.pxi":395 + * self.ICAFE_CS_CONN = ICAFE_CS_CONN + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN # <<<<<<<<<<<<<< + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + * + */ + __pyx_v_self->ICAFE_CS_DISCONN = ICAFE_CS_DISCONN; + + /* "PyCafeDefs.pxi":396 + * self.ICAFE_CS_CLOSED = ICAFE_CS_CLOSED + * self.ICAFE_CS_DISCONN = ICAFE_CS_DISCONN + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN # <<<<<<<<<<<<<< + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + */ + __pyx_v_self->ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN; + + /* "PyCafeDefs.pxi":398 + * self.ICAFE_CS_UNKNOWN = ICAFE_CS_UNKNOWN + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + */ + __pyx_v_self->ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN; + + /* "PyCafeDefs.pxi":399 + * + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE # <<<<<<<<<<<<<< + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + */ + __pyx_v_self->ICAFE_RULE_FALSE = ICAFE_RULE_FALSE; + + /* "PyCafeDefs.pxi":400 + * self.ICAFE_TYPENOTCONN = ICAFE_TYPENOTCONN + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT # <<<<<<<<<<<<<< + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + */ + __pyx_v_self->ICAFE_BADCOUNT = ICAFE_BADCOUNT; + + /* "PyCafeDefs.pxi":401 + * self.ICAFE_RULE_FALSE = ICAFE_RULE_FALSE + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED # <<<<<<<<<<<<<< + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + */ + __pyx_v_self->ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED; + + /* "PyCafeDefs.pxi":402 + * self.ICAFE_BADCOUNT = ICAFE_BADCOUNT + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK # <<<<<<<<<<<<<< + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + */ + __pyx_v_self->ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK; + + /* "PyCafeDefs.pxi":403 + * self.ICAFE_CALLBACK_NOT_YET_INVOKED = ICAFE_CALLBACK_NOT_YET_INVOKED + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY # <<<<<<<<<<<<<< + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + */ + __pyx_v_self->ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY; + + /* "PyCafeDefs.pxi":404 + * self.ICAFE_WAITING_FOR_PREV_CALLBACK = ICAFE_WAITING_FOR_PREV_CALLBACK + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT # <<<<<<<<<<<<<< + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + */ + __pyx_v_self->ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + + /* "PyCafeDefs.pxi":405 + * self.ICAFE_CACHE_EMPTY = ICAFE_CACHE_EMPTY + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN # <<<<<<<<<<<<<< + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + */ + __pyx_v_self->ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + + /* "PyCafeDefs.pxi":406 + * self.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT = ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE # <<<<<<<<<<<<<< + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + * + */ + __pyx_v_self->ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + + /* "PyCafeDefs.pxi":407 + * self.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH # <<<<<<<<<<<<<< + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + */ + __pyx_v_self->ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH; + + /* "PyCafeDefs.pxi":409 + * self.ICAFE_SET_AND_GET_MISMATCH = ICAFE_SET_AND_GET_MISMATCH + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN # <<<<<<<<<<<<<< + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + */ + __pyx_v_self->ICAFE_DAQ_RUN = ICAFE_DAQ_RUN; + + /* "PyCafeDefs.pxi":410 + * + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED # <<<<<<<<<<<<<< + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + * + */ + __pyx_v_self->ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED; + + /* "PyCafeDefs.pxi":411 + * self.ICAFE_DAQ_RUN = ICAFE_DAQ_RUN + * self.ICAFE_DAQ_PAUSED = ICAFE_DAQ_PAUSED + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED # <<<<<<<<<<<<<< + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + */ + __pyx_v_self->ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED; + + /* "PyCafeDefs.pxi":413 + * self.ICAFE_DAQ_STOPPED = ICAFE_DAQ_STOPPED + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + */ + __pyx_v_self->ICAFE_CA_OP_GET = ICAFE_CA_OP_GET; + + /* "PyCafeDefs.pxi":414 + * + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + */ + __pyx_v_self->ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT; + + /* "PyCafeDefs.pxi":415 + * self.ICAFE_CA_OP_GET = ICAFE_CA_OP_GET + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + */ + __pyx_v_self->ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL; + + /* "PyCafeDefs.pxi":416 + * self.ICAFE_CA_OP_PUT = ICAFE_CA_OP_PUT + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + */ + __pyx_v_self->ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT; + + /* "PyCafeDefs.pxi":417 + * self.ICAFE_CA_OP_CREATE_CHANNEL = ICAFE_CA_OP_CREATE_CHANNEL + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + */ + __pyx_v_self->ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT; + + /* "PyCafeDefs.pxi":418 + * self.ICAFE_CA_OP_ADD_EVENT = ICAFE_CA_OP_ADD_EVENT + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + */ + __pyx_v_self->ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER; + + /* "PyCafeDefs.pxi":419 + * self.ICAFE_CA_OP_CLEAR_EVENT = ICAFE_CA_OP_CLEAR_EVENT + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + * + */ + __pyx_v_self->ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN; + + /* "PyCafeDefs.pxi":420 + * self.ICAFE_CA_OP_OTHER = ICAFE_CA_OP_OTHER + * self.ICAFE_CA_OP_CONN_DOWN = ICAFE_CA_OP_CONN_DOWN + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP # <<<<<<<<<<<<<< + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + */ + __pyx_v_self->ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP; + + /* "PyCafeDefs.pxi":422 + * self.ICAFE_CA_OP_CONN_UP = ICAFE_CA_OP_CONN_UP + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + * + */ + __pyx_v_self->ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION; + + /* "PyCafeDefs.pxi":423 + * + * self.ECAFE_LOAD_COLLECTION = ECAFE_LOAD_COLLECTION + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP # <<<<<<<<<<<<<< + * + * self.ECAFE_NODATA = ECAFE_NODATA + */ + __pyx_v_self->ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP; + + /* "PyCafeDefs.pxi":425 + * self.ECAFE_LOAD_GROUP = ECAFE_LOAD_GROUP + * + * self.ECAFE_NODATA = ECAFE_NODATA # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + */ + __pyx_v_self->ECAFE_NODATA = ECAFE_NODATA; + + /* "PyCafeDefs.pxi":426 + * + * self.ECAFE_NODATA = ECAFE_NODATA + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE # <<<<<<<<<<<<<< + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR + */ + __pyx_v_self->ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE; + + /* "PyCafeDefs.pxi":427 + * self.ECAFE_NODATA = ECAFE_NODATA + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT # <<<<<<<<<<<<<< + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + */ + __pyx_v_self->ECAFE_BADCOUNT = ECAFE_BADCOUNT; + + /* "PyCafeDefs.pxi":428 + * self.ECAFE_INVALID_TYPE = ECAFE_INVALID_TYPE + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR # <<<<<<<<<<<<<< + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + */ + __pyx_v_self->ECAFE_BADSTR = ECAFE_BADSTR; + + /* "PyCafeDefs.pxi":429 + * self.ECAFE_BADCOUNT = ECAFE_BADCOUNT + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE # <<<<<<<<<<<<<< + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + */ + __pyx_v_self->ECAFE_BADTYPE = ECAFE_BADTYPE; + + /* "PyCafeDefs.pxi":430 + * self.ECAFE_BADSTR = ECAFE_BADSTR + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT # <<<<<<<<<<<<<< + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + */ + __pyx_v_self->ECAFE_NO_CONVERT = ECAFE_NO_CONVERT; + + /* "PyCafeDefs.pxi":431 + * self.ECAFE_BADTYPE = ECAFE_BADTYPE + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT # <<<<<<<<<<<<<< + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + */ + __pyx_v_self->ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT; + + /* "PyCafeDefs.pxi":432 + * self.ECAFE_NO_CONVERT = ECAFE_NO_CONVERT + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID # <<<<<<<<<<<<<< + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + */ + __pyx_v_self->ECAFE_NULLCHID = ECAFE_NULLCHID; + + /* "PyCafeDefs.pxi":433 + * self.ECAFE_NULLCONTEXT = ECAFE_NULLCONTEXT + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID # <<<<<<<<<<<<<< + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + */ + __pyx_v_self->ECAFE_NULLEVID = ECAFE_NULLEVID; + + /* "PyCafeDefs.pxi":434 + * self.ECAFE_NULLCHID = ECAFE_NULLCHID + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + */ + __pyx_v_self->ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION; + + /* "PyCafeDefs.pxi":435 + * self.ECAFE_NULLEVID = ECAFE_NULLEVID + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION # <<<<<<<<<<<<<< + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + */ + __pyx_v_self->ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION; + + /* "PyCafeDefs.pxi":436 + * self.ECAFE_UNKNOWN_COLLECTION = ECAFE_UNKNOWN_COLLECTION + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + */ + __pyx_v_self->ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF; + + /* "PyCafeDefs.pxi":437 + * self.ECAFE_EMPTY_COLLECTION = ECAFE_EMPTY_COLLECTION + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER # <<<<<<<<<<<<<< + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + */ + __pyx_v_self->ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER; + + /* "PyCafeDefs.pxi":438 + * self.ECAFE_COLLECTION_PREV_DEF = ECAFE_COLLECTION_PREV_DEF + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE # <<<<<<<<<<<<<< + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + */ + __pyx_v_self->ECAFE_RULE_FALSE = ECAFE_RULE_FALSE; + + /* "PyCafeDefs.pxi":439 + * self.ECAFE_COLLECTION_INVALID_MEMBER = ECAFE_COLLECTION_INVALID_MEMBER + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP # <<<<<<<<<<<<<< + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + */ + __pyx_v_self->ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP; + + /* "PyCafeDefs.pxi":440 + * self.ECAFE_RULE_FALSE = ECAFE_RULE_FALSE + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP # <<<<<<<<<<<<<< + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + */ + __pyx_v_self->ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP; + + /* "PyCafeDefs.pxi":441 + * self.ECAFE_UNKNOWN_GROUP = ECAFE_UNKNOWN_GROUP + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + */ + __pyx_v_self->ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF; + + /* "PyCafeDefs.pxi":442 + * self.ECAFE_EMPTY_GROUP = ECAFE_EMPTY_GROUP + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + */ + __pyx_v_self->ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE; + + /* "PyCafeDefs.pxi":443 + * self.ECAFE_GROUP_PREV_DEF = ECAFE_GROUP_PREV_DEF + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + */ + __pyx_v_self->ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE; + + /* "PyCafeDefs.pxi":444 + * self.ECAFE_INVALID_HANDLE = ECAFE_INVALID_HANDLE + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS # <<<<<<<<<<<<<< + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + */ + __pyx_v_self->ECAFE_NORDACCESS = ECAFE_NORDACCESS; + + /* "PyCafeDefs.pxi":445 + * self.ECAFE_INVALID_GROUP_HANDLE = ECAFE_INVALID_GROUP_HANDLE + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS # <<<<<<<<<<<<<< + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + */ + __pyx_v_self->ECAFE_NOWTACCESS = ECAFE_NOWTACCESS; + + /* "PyCafeDefs.pxi":446 + * self.ECAFE_NORDACCESS = ECAFE_NORDACCESS + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT # <<<<<<<<<<<<<< + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + */ + __pyx_v_self->ECAFE_TIMEOUT = ECAFE_TIMEOUT; + + /* "PyCafeDefs.pxi":447 + * self.ECAFE_NOWTACCESS = ECAFE_NOWTACCESS + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + */ + __pyx_v_self->ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE; + + /* "PyCafeDefs.pxi":448 + * self.ECAFE_TIMEOUT = ECAFE_TIMEOUT + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE # <<<<<<<<<<<<<< + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + */ + __pyx_v_self->ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE; + + /* "PyCafeDefs.pxi":449 + * self.ECAFE_CANNOT_OPEN_FILE = ECAFE_CANNOT_OPEN_FILE + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF # <<<<<<<<<<<<<< + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + */ + __pyx_v_self->ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF; + + /* "PyCafeDefs.pxi":450 + * self.ECAFE_INVALID_SWITCH_CASE = ECAFE_INVALID_SWITCH_CASE + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID # <<<<<<<<<<<<<< + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + */ + __pyx_v_self->ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID; + + /* "PyCafeDefs.pxi":451 + * self.ECAFE_PVALIAS_PREV_DEF = ECAFE_PVALIAS_PREV_DEF + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS # <<<<<<<<<<<<<< + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + */ + __pyx_v_self->ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS; + + /* "PyCafeDefs.pxi":452 + * self.ECAFE_PVALIAS_INVALID = ECAFE_PVALIAS_INVALID + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND # <<<<<<<<<<<<<< + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + */ + __pyx_v_self->ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND; + + /* "PyCafeDefs.pxi":453 + * self.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS = ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS # <<<<<<<<<<<<<< + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + */ + __pyx_v_self->ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS; + + /* "PyCafeDefs.pxi":454 + * self.ECAFE_DEVICE_ATTRIB_NOT_FOUND = ECAFE_DEVICE_ATTRIB_NOT_FOUND + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + */ + __pyx_v_self->ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT; + + /* "PyCafeDefs.pxi":455 + * self.ECAFE_HASH_UNIQUEID_EXISTS = ECAFE_HASH_UNIQUEID_EXISTS + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE # <<<<<<<<<<<<<< + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + */ + __pyx_v_self->ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE; + + /* "PyCafeDefs.pxi":456 + * self.ECAFE_WRONG_CA_CONTEXT = ECAFE_WRONG_CA_CONTEXT + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED # <<<<<<<<<<<<<< + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + */ + __pyx_v_self->ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + + /* "PyCafeDefs.pxi":457 + * self.ECAFE_INVALID_CAFENUM_POLICY_TYPE = ECAFE_INVALID_CAFENUM_POLICY_TYPE + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX # <<<<<<<<<<<<<< + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + */ + __pyx_v_self->ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX; + + /* "PyCafeDefs.pxi":458 + * self.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED = ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH # <<<<<<<<<<<<<< + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + */ + __pyx_v_self->ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + + /* "PyCafeDefs.pxi":459 + * self.ECAFE_INVALID_ENUM_INDEX = ECAFE_INVALID_ENUM_INDEX + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH # <<<<<<<<<<<<<< + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + */ + __pyx_v_self->ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":460 + * self.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH = ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH # <<<<<<<<<<<<<< + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + */ + __pyx_v_self->ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":461 + * self.ECAFE_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH + * self.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED # <<<<<<<<<<<<<< + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + */ + __pyx_v_self->ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED; + + /* "PyCafeDefs.pxi":463 + * self.ECAFE_INCONSISTENT_CONTAINER_CORRECTED = ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + */ + __pyx_v_self->ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID; + + /* "PyCafeDefs.pxi":464 + * + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + */ + __pyx_v_self->ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS; + + /* "PyCafeDefs.pxi":465 + * self.ECAFE_BPM_DATA_IS_INVALID = ECAFE_BPM_DATA_IS_INVALID + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + */ + __pyx_v_self->ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM; + + /* "PyCafeDefs.pxi":466 + * self.ECAFE_BITSHUFF_DECOMPRESS = ECAFE_BITSHUFF_DECOMPRESS + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM # <<<<<<<<<<<<<< + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + * + */ + __pyx_v_self->ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM; + + /* "PyCafeDefs.pxi":467 + * self.ECAFE_BITSHUFF_ALLOCMEM = ECAFE_BITSHUFF_ALLOCMEM + * self.ECAFE_BITSHUFF_REALLOCMEM = ECAFE_BITSHUFF_REALLOCMEM + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT # <<<<<<<<<<<<<< + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + */ + __pyx_v_self->ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT; + + /* "PyCafeDefs.pxi":469 + * self.ECAFE_BITSHUFF_BADCOUNT = ECAFE_BITSHUFF_BADCOUNT + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + */ + __pyx_v_self->ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA; + + /* "PyCafeDefs.pxi":470 + * + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + */ + __pyx_v_self->ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER; + + /* "PyCafeDefs.pxi":471 + * self.ECAFE_BSREAD_MULTIPART_MESS_NODATA = ECAFE_BSREAD_MULTIPART_MESS_NODATA + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER # <<<<<<<<<<<<<< + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + * + */ + __pyx_v_self->ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER; + + /* "PyCafeDefs.pxi":472 + * self.ECAFE_BSREAD_PARSEFAIL_MAINHEADER = ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * self.ECAFE_BSREAD_PARSEFAIL_DATAHEADER = ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL # <<<<<<<<<<<<<< + * + * self.ERRNO_EINTR = ERRNO_EINTR + */ + __pyx_v_self->ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL; + + /* "PyCafeDefs.pxi":474 + * self.ECAFE_BSREAD_ZMQSTREAM_NULL = ECAFE_BSREAD_ZMQSTREAM_NULL + * + * self.ERRNO_EINTR = ERRNO_EINTR # <<<<<<<<<<<<<< + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT + */ + __pyx_v_self->ERRNO_EINTR = ERRNO_EINTR; + + /* "PyCafeDefs.pxi":475 + * + * self.ERRNO_EINTR = ERRNO_EINTR + * self.ERRNO_EAGAIN = ERRNO_EAGAIN # <<<<<<<<<<<<<< + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL + */ + __pyx_v_self->ERRNO_EAGAIN = ERRNO_EAGAIN; + + /* "PyCafeDefs.pxi":476 + * self.ERRNO_EINTR = ERRNO_EINTR + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT # <<<<<<<<<<<<<< + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + */ + __pyx_v_self->ERRNO_EFAULT = ERRNO_EFAULT; + + /* "PyCafeDefs.pxi":477 + * self.ERRNO_EAGAIN = ERRNO_EAGAIN + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL # <<<<<<<<<<<<<< + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + */ + __pyx_v_self->ERRNO_EINVAL = ERRNO_EINVAL; + + /* "PyCafeDefs.pxi":478 + * self.ERRNO_EFAULT = ERRNO_EFAULT + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK # <<<<<<<<<<<<<< + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + * + */ + __pyx_v_self->ERRNO_ENOTSOCK = ERRNO_ENOTSOCK; + + /* "PyCafeDefs.pxi":479 + * self.ERRNO_EINVAL = ERRNO_EINVAL + * self.ERRNO_ENOTSOCK = ERRNO_ENOTSOCK + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT # <<<<<<<<<<<<<< + * + * self.SEV_NO_ALARM = SEV_NO_ALARM + */ + __pyx_v_self->ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT; + + /* "PyCafeDefs.pxi":481 + * self.ERRNO_EPROTONOSUPPORT = ERRNO_EPROTONOSUPPORT + * + * self.SEV_NO_ALARM = SEV_NO_ALARM # <<<<<<<<<<<<<< + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR + */ + __pyx_v_self->SEV_NO_ALARM = SEV_NO_ALARM; + + /* "PyCafeDefs.pxi":482 + * + * self.SEV_NO_ALARM = SEV_NO_ALARM + * self.SEV_MINOR = SEV_MINOR # <<<<<<<<<<<<<< + * self.SEV_MAJOR = SEV_MAJOR + * self.SEV_INVALID = SEV_INVALID + */ + __pyx_v_self->SEV_MINOR = SEV_MINOR; + + /* "PyCafeDefs.pxi":483 + * self.SEV_NO_ALARM = SEV_NO_ALARM + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR # <<<<<<<<<<<<<< + * self.SEV_INVALID = SEV_INVALID + * + */ + __pyx_v_self->SEV_MAJOR = SEV_MAJOR; + + /* "PyCafeDefs.pxi":484 + * self.SEV_MINOR = SEV_MINOR + * self.SEV_MAJOR = SEV_MAJOR + * self.SEV_INVALID = SEV_INVALID # <<<<<<<<<<<<<< + * + * self.STAT_NO_ALARM = STAT_NO_ALARM + */ + __pyx_v_self->SEV_INVALID = SEV_INVALID; + + /* "PyCafeDefs.pxi":486 + * self.SEV_INVALID = SEV_INVALID + * + * self.STAT_NO_ALARM = STAT_NO_ALARM # <<<<<<<<<<<<<< + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE + */ + __pyx_v_self->STAT_NO_ALARM = STAT_NO_ALARM; + + /* "PyCafeDefs.pxi":487 + * + * self.STAT_NO_ALARM = STAT_NO_ALARM + * self.STAT_READ = STAT_READ # <<<<<<<<<<<<<< + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI + */ + __pyx_v_self->STAT_READ = STAT_READ; + + /* "PyCafeDefs.pxi":488 + * self.STAT_NO_ALARM = STAT_NO_ALARM + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE # <<<<<<<<<<<<<< + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH + */ + __pyx_v_self->STAT_WRITE = STAT_WRITE; + + /* "PyCafeDefs.pxi":489 + * self.STAT_READ = STAT_READ + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI # <<<<<<<<<<<<<< + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO + */ + __pyx_v_self->STAT_HIHI = STAT_HIHI; + + /* "PyCafeDefs.pxi":490 + * self.STAT_WRITE = STAT_WRITE + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH # <<<<<<<<<<<<<< + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW + */ + __pyx_v_self->STAT_HIGH = STAT_HIGH; + + /* "PyCafeDefs.pxi":491 + * self.STAT_HIHI = STAT_HIHI + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO # <<<<<<<<<<<<<< + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE + */ + __pyx_v_self->STAT_LOLO = STAT_LOLO; + + /* "PyCafeDefs.pxi":492 + * self.STAT_HIGH = STAT_HIGH + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW # <<<<<<<<<<<<<< + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS + */ + __pyx_v_self->STAT_LOW = STAT_LOW; + + /* "PyCafeDefs.pxi":493 + * self.STAT_LOLO = STAT_LOLO + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE # <<<<<<<<<<<<<< + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM + */ + __pyx_v_self->STAT_STATE = STAT_STATE; + + /* "PyCafeDefs.pxi":494 + * self.STAT_LOW = STAT_LOW + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS # <<<<<<<<<<<<<< + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT + */ + __pyx_v_self->STAT_COS = STAT_COS; + + /* "PyCafeDefs.pxi":495 + * self.STAT_STATE = STAT_STATE + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM # <<<<<<<<<<<<<< + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT + */ + __pyx_v_self->STAT_COMM = STAT_COMM; + + /* "PyCafeDefs.pxi":496 + * self.STAT_COS = STAT_COS + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT # <<<<<<<<<<<<<< + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC + */ + __pyx_v_self->STAT_TIMEOUT = STAT_TIMEOUT; + + /* "PyCafeDefs.pxi":497 + * self.STAT_COMM = STAT_COMM + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT # <<<<<<<<<<<<<< + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN + */ + __pyx_v_self->STAT_HWLIMIT = STAT_HWLIMIT; + + /* "PyCafeDefs.pxi":498 + * self.STAT_TIMEOUT = STAT_TIMEOUT + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC # <<<<<<<<<<<<<< + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK + */ + __pyx_v_self->STAT_CALC = STAT_CALC; + + /* "PyCafeDefs.pxi":499 + * self.STAT_HWLIMIT = STAT_HWLIMIT + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN # <<<<<<<<<<<<<< + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT + */ + __pyx_v_self->STAT_SCAN = STAT_SCAN; + + /* "PyCafeDefs.pxi":500 + * self.STAT_CALC = STAT_CALC + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK # <<<<<<<<<<<<<< + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB + */ + __pyx_v_self->STAT_LINK = STAT_LINK; + + /* "PyCafeDefs.pxi":501 + * self.STAT_SCAN = STAT_SCAN + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT # <<<<<<<<<<<<<< + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF + */ + __pyx_v_self->STAT_SOFT = STAT_SOFT; + + /* "PyCafeDefs.pxi":502 + * self.STAT_LINK = STAT_LINK + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB # <<<<<<<<<<<<<< + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE + */ + __pyx_v_self->STAT_BAD_SUB = STAT_BAD_SUB; + + /* "PyCafeDefs.pxi":503 + * self.STAT_SOFT = STAT_SOFT + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF # <<<<<<<<<<<<<< + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM + */ + __pyx_v_self->STAT_UDF = STAT_UDF; + + /* "PyCafeDefs.pxi":504 + * self.STAT_BAD_SUB = STAT_BAD_SUB + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE # <<<<<<<<<<<<<< + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + */ + __pyx_v_self->STAT_DISABLE = STAT_DISABLE; + + /* "PyCafeDefs.pxi":505 + * self.STAT_UDF = STAT_UDF + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM # <<<<<<<<<<<<<< + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + */ + __pyx_v_self->STAT_SIMM = STAT_SIMM; + + /* "PyCafeDefs.pxi":506 + * self.STAT_DISABLE = STAT_DISABLE + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS # <<<<<<<<<<<<<< + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + * + */ + __pyx_v_self->STAT_READ_ACCESS = STAT_READ_ACCESS; + + /* "PyCafeDefs.pxi":507 + * self.STAT_SIMM = STAT_SIMM + * self.STAT_READ_ACCESS = STAT_READ_ACCESS + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS # <<<<<<<<<<<<<< + * + * self.CY_DBE_VALUE = DBE_VALUE + */ + __pyx_v_self->STAT_WRITE_ACCESS = STAT_WRITE_ACCESS; + + /* "PyCafeDefs.pxi":509 + * self.STAT_WRITE_ACCESS = STAT_WRITE_ACCESS + * + * self.CY_DBE_VALUE = DBE_VALUE # <<<<<<<<<<<<<< + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + */ + __pyx_v_self->CY_DBE_VALUE = DBE_VALUE; + + /* "PyCafeDefs.pxi":510 + * + * self.CY_DBE_VALUE = DBE_VALUE + * self.CY_DBE_LOG = DBE_LOG # <<<<<<<<<<<<<< + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM + */ + __pyx_v_self->CY_DBE_LOG = DBE_LOG; + + /* "PyCafeDefs.pxi":511 + * self.CY_DBE_VALUE = DBE_VALUE + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE # <<<<<<<<<<<<<< + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY + */ + __pyx_v_self->CY_DBE_ARCHIVE = DBE_ARCHIVE; + + /* "PyCafeDefs.pxi":512 + * self.CY_DBE_LOG = DBE_LOG + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM # <<<<<<<<<<<<<< + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + */ + __pyx_v_self->CY_DBE_ALARM = DBE_ALARM; + + /* "PyCafeDefs.pxi":513 + * self.CY_DBE_ARCHIVE = DBE_ARCHIVE + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY # <<<<<<<<<<<<<< + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN + */ + __pyx_v_self->CY_DBE_PROPERTY = DBE_PROPERTY; + + /* "PyCafeDefs.pxi":514 + * self.CY_DBE_ALARM = DBE_ALARM + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE # <<<<<<<<<<<<<< + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS + */ + __pyx_v_self->CY_DBR_PRIMITIVE = DBR_PRIMITIVE; + + /* "PyCafeDefs.pxi":515 + * self.CY_DBE_PROPERTY = DBE_PROPERTY + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN # <<<<<<<<<<<<<< + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME + */ + __pyx_v_self->CY_DBR_PLAIN = DBR_PLAIN; + + /* "PyCafeDefs.pxi":516 + * self.CY_DBR_PRIMITIVE = DBR_PRIMITIVE + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS # <<<<<<<<<<<<<< + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR + */ + __pyx_v_self->CY_DBR_STS = DBR_STS; + + /* "PyCafeDefs.pxi":517 + * self.CY_DBR_PLAIN = DBR_PLAIN + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME # <<<<<<<<<<<<<< + * self.CY_DBR_GR = DBR_GR + * self.CY_DBR_CTRL = DBR_CTRL + */ + __pyx_v_self->CY_DBR_TIME = DBR_TIME; + + /* "PyCafeDefs.pxi":518 + * self.CY_DBR_STS = DBR_STS + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR # <<<<<<<<<<<<<< + * self.CY_DBR_CTRL = DBR_CTRL + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + */ + __pyx_v_self->CY_DBR_GR = DBR_GR; + + /* "PyCafeDefs.pxi":519 + * self.CY_DBR_TIME = DBR_TIME + * self.CY_DBR_GR = DBR_GR + * self.CY_DBR_CTRL = DBR_CTRL # <<<<<<<<<<<<<< + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT + */ + __pyx_v_self->CY_DBR_CTRL = DBR_CTRL; + + /* "PyCafeDefs.pxi":521 + * self.CY_DBR_CTRL = DBR_CTRL + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT # <<<<<<<<<<<<<< + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + */ + __pyx_v_self->CY_DBR_PUT = DBR_PUT; + + /* "PyCafeDefs.pxi":522 + * # DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge. + * self.CY_DBR_PUT = DBR_PUT + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING # <<<<<<<<<<<<<< + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE + */ + __pyx_v_self->CY_DBR_STSACK = DBR_STSACK; + + /* "PyCafeDefs.pxi":523 + * self.CY_DBR_PUT = DBR_PUT + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, # <<<<<<<<<<<<<< + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING + */ + __pyx_v_self->CY_DBR_CLASS = DBR_CLASS; + + /* "PyCafeDefs.pxi":524 + * self.CY_DBR_STSACK = DBR_STSACK # is DBR_STSACK_STRING + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE # <<<<<<<<<<<<<< + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + */ + __pyx_v_self->CY_DBR_NONE = DBR_NONE; + + /* "PyCafeDefs.pxi":525 + * self.CY_DBR_CLASS = DBR_CLASS # is DBR_CLASS_NAME, + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING # <<<<<<<<<<<<<< + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + */ + __pyx_v_self->CY_DBR_STRING = DBR_STRING; + + /* "PyCafeDefs.pxi":526 + * self.CY_DBR_NONE = DBR_NONE + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short # <<<<<<<<<<<<<< + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + */ + __pyx_v_self->CY_DBR_SHORT = DBR_SHORT; + + /* "PyCafeDefs.pxi":527 + * self.CY_DBR_STRING = DBR_STRING + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short # <<<<<<<<<<<<<< + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + */ + __pyx_v_self->CY_DBR_INT = DBR_INT; + + /* "PyCafeDefs.pxi":528 + * self.CY_DBR_SHORT = DBR_SHORT # returns an unsigned short + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value # <<<<<<<<<<<<<< + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + */ + __pyx_v_self->CY_DBR_FLOAT = DBR_FLOAT; + + /* "PyCafeDefs.pxi":529 + * self.CY_DBR_INT = DBR_INT # returns an unsigned short + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item # <<<<<<<<<<<<<< + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + */ + __pyx_v_self->CY_DBR_ENUM = DBR_ENUM; + + /* "PyCafeDefs.pxi":530 + * self.CY_DBR_FLOAT = DBR_FLOAT # returns an IEEE floating point value + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char # <<<<<<<<<<<<<< + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + */ + __pyx_v_self->CY_DBR_CHAR = DBR_CHAR; + + /* "PyCafeDefs.pxi":531 + * self.CY_DBR_ENUM = DBR_ENUM # returns an unsigned short which is the enum item + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long # <<<<<<<<<<<<<< + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + * # returns a string status structure (dbr_sts_string) + */ + __pyx_v_self->CY_DBR_LONG = DBR_LONG; + + /* "PyCafeDefs.pxi":532 + * self.CY_DBR_CHAR = DBR_CHAR # returns an unsigned char + * self.CY_DBR_LONG = DBR_LONG # returns an unsigned long + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number # <<<<<<<<<<<<<< + * # returns a string status structure (dbr_sts_string) + * self.CY_DBR_STS_STRING = DBR_STS_STRING + */ + __pyx_v_self->CY_DBR_DOUBLE = DBR_DOUBLE; + + /* "PyCafeDefs.pxi":534 + * self.CY_DBR_DOUBLE = DBR_DOUBLE # returns a double precision floating point number + * # returns a string status structure (dbr_sts_string) + * self.CY_DBR_STS_STRING = DBR_STS_STRING # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_short) + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT + */ + __pyx_v_self->CY_DBR_STS_STRING = DBR_STS_STRING; + + /* "PyCafeDefs.pxi":536 + * self.CY_DBR_STS_STRING = DBR_STS_STRING + * # returns a short status structure (dbr_sts_short) + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_int) + * self.CY_DBR_STS_INT = DBR_STS_INT + */ + __pyx_v_self->CY_DBR_STS_SHORT = DBR_STS_SHORT; + + /* "PyCafeDefs.pxi":538 + * self.CY_DBR_STS_SHORT = DBR_STS_SHORT + * # returns a short status structure (dbr_sts_int) + * self.CY_DBR_STS_INT = DBR_STS_INT # <<<<<<<<<<<<<< + * # returns a float status structure (dbr_sts_float) + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + */ + __pyx_v_self->CY_DBR_STS_INT = DBR_STS_INT; + + /* "PyCafeDefs.pxi":540 + * self.CY_DBR_STS_INT = DBR_STS_INT + * # returns a float status structure (dbr_sts_float) + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT # <<<<<<<<<<<<<< + * # returns an enum status structure (dbr_sts_enum) + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM + */ + __pyx_v_self->CY_DBR_STS_FLOAT = DBR_STS_FLOAT; + + /* "PyCafeDefs.pxi":542 + * self.CY_DBR_STS_FLOAT = DBR_STS_FLOAT + * # returns an enum status structure (dbr_sts_enum) + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM # <<<<<<<<<<<<<< + * # returns a char status structure (dbr_sts_char) + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR + */ + __pyx_v_self->CY_DBR_STS_ENUM = DBR_STS_ENUM; + + /* "PyCafeDefs.pxi":544 + * self.CY_DBR_STS_ENUM = DBR_STS_ENUM + * # returns a char status structure (dbr_sts_char) + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR # <<<<<<<<<<<<<< + * # returns a long status structure (dbr_sts_long) + * self.CY_DBR_STS_LONG = DBR_STS_LONG + */ + __pyx_v_self->CY_DBR_STS_CHAR = DBR_STS_CHAR; + + /* "PyCafeDefs.pxi":546 + * self.CY_DBR_STS_CHAR = DBR_STS_CHAR + * # returns a long status structure (dbr_sts_long) + * self.CY_DBR_STS_LONG = DBR_STS_LONG # <<<<<<<<<<<<<< + * # returns a double status structure (dbr_sts_double) + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + */ + __pyx_v_self->CY_DBR_STS_LONG = DBR_STS_LONG; + + /* "PyCafeDefs.pxi":548 + * self.CY_DBR_STS_LONG = DBR_STS_LONG + * # returns a double status structure (dbr_sts_double) + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE # <<<<<<<<<<<<<< + * # returns a string time structure (dbr_time_string) + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING + */ + __pyx_v_self->CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE; + + /* "PyCafeDefs.pxi":550 + * self.CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE + * # returns a string time structure (dbr_time_string) + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + */ + __pyx_v_self->CY_DBR_TIME_STRING = DBR_TIME_STRING; + + /* "PyCafeDefs.pxi":552 + * self.CY_DBR_TIME_STRING = DBR_TIME_STRING + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_INT = DBR_TIME_INT + */ + __pyx_v_self->CY_DBR_TIME_SHORT = DBR_TIME_SHORT; + + /* "PyCafeDefs.pxi":554 + * self.CY_DBR_TIME_SHORT = DBR_TIME_SHORT + * # returns a short time structure (dbr_time_short) + * self.CY_DBR_TIME_INT = DBR_TIME_INT # <<<<<<<<<<<<<< + * # returns a float time structure (dbr_time_float) + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + */ + __pyx_v_self->CY_DBR_TIME_INT = DBR_TIME_INT; + + /* "PyCafeDefs.pxi":556 + * self.CY_DBR_TIME_INT = DBR_TIME_INT + * # returns a float time structure (dbr_time_float) + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT # <<<<<<<<<<<<<< + * # returns an enum time structure (dbr_time_enum) + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + */ + __pyx_v_self->CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT; + + /* "PyCafeDefs.pxi":558 + * self.CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT + * # returns an enum time structure (dbr_time_enum) + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM # <<<<<<<<<<<<<< + * # returns a char time structure (dbr_time_char) + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + */ + __pyx_v_self->CY_DBR_TIME_ENUM = DBR_TIME_ENUM; + + /* "PyCafeDefs.pxi":560 + * self.CY_DBR_TIME_ENUM = DBR_TIME_ENUM + * # returns a char time structure (dbr_time_char) + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR # <<<<<<<<<<<<<< + * # returns a long time structure (dbr_time_long) + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG + */ + __pyx_v_self->CY_DBR_TIME_CHAR = DBR_TIME_CHAR; + + /* "PyCafeDefs.pxi":562 + * self.CY_DBR_TIME_CHAR = DBR_TIME_CHAR + * # returns a long time structure (dbr_time_long) + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG # <<<<<<<<<<<<<< + * # returns a double time structure (dbr_time_double) + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + */ + __pyx_v_self->CY_DBR_TIME_LONG = DBR_TIME_LONG; + + /* "PyCafeDefs.pxi":564 + * self.CY_DBR_TIME_LONG = DBR_TIME_LONG + * # returns a double time structure (dbr_time_double) + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE # <<<<<<<<<<<<<< + * # returns a graphic string structure (dbr_gr_string) + * self.CY_DBR_GR_STRING = DBR_GR_STRING + */ + __pyx_v_self->CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE; + + /* "PyCafeDefs.pxi":566 + * self.CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE + * # returns a graphic string structure (dbr_gr_string) + * self.CY_DBR_GR_STRING = DBR_GR_STRING # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_short) + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT + */ + __pyx_v_self->CY_DBR_GR_STRING = DBR_GR_STRING; + + /* "PyCafeDefs.pxi":568 + * self.CY_DBR_GR_STRING = DBR_GR_STRING + * # returns a graphic short structure (dbr_gr_short) + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_int) + * self.CY_DBR_GR_INT = DBR_GR_INT + */ + __pyx_v_self->CY_DBR_GR_SHORT = DBR_GR_SHORT; + + /* "PyCafeDefs.pxi":570 + * self.CY_DBR_GR_SHORT = DBR_GR_SHORT + * # returns a graphic short structure (dbr_gr_int) + * self.CY_DBR_GR_INT = DBR_GR_INT # <<<<<<<<<<<<<< + * # returns a graphic float structure (dbr_gr_float) + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + */ + __pyx_v_self->CY_DBR_GR_INT = DBR_GR_INT; + + /* "PyCafeDefs.pxi":572 + * self.CY_DBR_GR_INT = DBR_GR_INT + * # returns a graphic float structure (dbr_gr_float) + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT # <<<<<<<<<<<<<< + * # returns a graphic enum structure (dbr_gr_enum) + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM + */ + __pyx_v_self->CY_DBR_GR_FLOAT = DBR_GR_FLOAT; + + /* "PyCafeDefs.pxi":574 + * self.CY_DBR_GR_FLOAT = DBR_GR_FLOAT + * # returns a graphic enum structure (dbr_gr_enum) + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM # <<<<<<<<<<<<<< + * # returns a graphic char structure (dbr_gr_char) + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR + */ + __pyx_v_self->CY_DBR_GR_ENUM = DBR_GR_ENUM; + + /* "PyCafeDefs.pxi":576 + * self.CY_DBR_GR_ENUM = DBR_GR_ENUM + * # returns a graphic char structure (dbr_gr_char) + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR # <<<<<<<<<<<<<< + * # returns a graphic long structure (dbr_gr_long) + * self.CY_DBR_GR_LONG = DBR_GR_LONG + */ + __pyx_v_self->CY_DBR_GR_CHAR = DBR_GR_CHAR; + + /* "PyCafeDefs.pxi":578 + * self.CY_DBR_GR_CHAR = DBR_GR_CHAR + * # returns a graphic long structure (dbr_gr_long) + * self.CY_DBR_GR_LONG = DBR_GR_LONG # <<<<<<<<<<<<<< + * # returns a graphic double structure (dbr_gr_double) + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + */ + __pyx_v_self->CY_DBR_GR_LONG = DBR_GR_LONG; + + /* "PyCafeDefs.pxi":580 + * self.CY_DBR_GR_LONG = DBR_GR_LONG + * # returns a graphic double structure (dbr_gr_double) + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE # <<<<<<<<<<<<<< + * # returns a control string structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + */ + __pyx_v_self->CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE; + + /* "PyCafeDefs.pxi":582 + * self.CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE + * # returns a control string structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_short) + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + */ + __pyx_v_self->CY_DBR_CTRL_STRING = DBR_CTRL_STRING; + + /* "PyCafeDefs.pxi":584 + * self.CY_DBR_CTRL_STRING = DBR_CTRL_STRING + * # returns a control short structure (dbr_ctrl_short) + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT + */ + __pyx_v_self->CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT; + + /* "PyCafeDefs.pxi":586 + * self.CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT + * # returns a control short structure (dbr_ctrl_int) + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT # <<<<<<<<<<<<<< + * # returns a control float structure (dbr_ctrl_float) + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + */ + __pyx_v_self->CY_DBR_CTRL_INT = DBR_CTRL_INT; + + /* "PyCafeDefs.pxi":588 + * self.CY_DBR_CTRL_INT = DBR_CTRL_INT + * # returns a control float structure (dbr_ctrl_float) + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT # <<<<<<<<<<<<<< + * # returns a control enum structure (dbr_ctrl_enum) + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + */ + __pyx_v_self->CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT; + + /* "PyCafeDefs.pxi":590 + * self.CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT + * # returns a control enum structure (dbr_ctrl_enum) + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM # <<<<<<<<<<<<<< + * # returns a control char structure (dbr_ctrl_char) + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + */ + __pyx_v_self->CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM; + + /* "PyCafeDefs.pxi":592 + * self.CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM + * # returns a control char structure (dbr_ctrl_char) + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR # <<<<<<<<<<<<<< + * # returns a control long structure (dbr_ctrl_long) + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + */ + __pyx_v_self->CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR; + + /* "PyCafeDefs.pxi":594 + * self.CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR + * # returns a control long structure (dbr_ctrl_long) + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG # <<<<<<<<<<<<<< + * # returns a control double structure (dbr_ctrl_double) + * self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE + */ + __pyx_v_self->CY_DBR_CTRL_LONG = DBR_CTRL_LONG; + + /* "PyCafeDefs.pxi":596 + * self.CY_DBR_CTRL_LONG = DBR_CTRL_LONG + * # returns a control double structure (dbr_ctrl_double) + * self.CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE # <<<<<<<<<<<<<< + * + * # ctypedef enum ChannelRequestPolicyKind: + */ + __pyx_v_self->CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE; + + /* "PyCafeDefs.pxi":599 + * + * # ctypedef enum ChannelRequestPolicyKind: + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK # <<<<<<<<<<<<<< + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_v_self->WITHOUT_CALLBACK = WITHOUT_CALLBACK; + + /* "PyCafeDefs.pxi":600 + * # ctypedef enum ChannelRequestPolicyKind: + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT # <<<<<<<<<<<<<< + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED + * + */ + __pyx_v_self->WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT; + + /* "PyCafeDefs.pxi":601 + * self.WITHOUT_CALLBACK = WITHOUT_CALLBACK + * self.WITH_CALLBACK_DEFAULT = WITH_CALLBACK_DEFAULT + * self.WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * # ChannelFlushSendBufferPolicyKind: + */ + __pyx_v_self->WITH_CALLBACK_USER_SUPPLIED = WITH_CALLBACK_USER_SUPPLIED; + + /* "PyCafeDefs.pxi":604 + * + * # ChannelFlushSendBufferPolicyKind: + * self.WITH_FLUSH_IO = WITH_FLUSH_IO # <<<<<<<<<<<<<< + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + */ + __pyx_v_self->WITH_FLUSH_IO = WITH_FLUSH_IO; + + /* "PyCafeDefs.pxi":605 + * # ChannelFlushSendBufferPolicyKind: + * self.WITH_FLUSH_IO = WITH_FLUSH_IO + * self.WITH_PEND_IO = WITH_PEND_IO # <<<<<<<<<<<<<< + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + * self.WITH_POLL = WITH_POLL + */ + __pyx_v_self->WITH_PEND_IO = WITH_PEND_IO; + + /* "PyCafeDefs.pxi":606 + * self.WITH_FLUSH_IO = WITH_FLUSH_IO + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT # <<<<<<<<<<<<<< + * self.WITH_POLL = WITH_POLL + * + */ + __pyx_v_self->WITH_PEND_EVENT = WITH_PEND_EVENT; + + /* "PyCafeDefs.pxi":607 + * self.WITH_PEND_IO = WITH_PEND_IO + * self.WITH_PEND_EVENT = WITH_PEND_EVENT + * self.WITH_POLL = WITH_POLL # <<<<<<<<<<<<<< + * + * # ChannelWhenToFlushSendBufferPolicyKind: + */ + __pyx_v_self->WITH_POLL = WITH_POLL; + + /* "PyCafeDefs.pxi":610 + * + * # ChannelWhenToFlushSendBufferPolicyKind: + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC # <<<<<<<<<<<<<< + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + */ + __pyx_v_self->FLUSH_AUTOMATIC = FLUSH_AUTOMATIC; + + /* "PyCafeDefs.pxi":611 + * # ChannelWhenToFlushSendBufferPolicyKind: + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + * self.FLUSH_NOW = FLUSH_NOW # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + */ + __pyx_v_self->FLUSH_NOW = FLUSH_NOW; + + /* "PyCafeDefs.pxi":612 + * self.FLUSH_AUTOMATIC = FLUSH_AUTOMATIC + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + */ + __pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION; + + /* "PyCafeDefs.pxi":613 + * self.FLUSH_NOW = FLUSH_NOW + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + */ + __pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION; + + /* "PyCafeDefs.pxi":614 + * self.FLUSH_AFTER_EACH_CHANNEL_CREATION = FLUSH_AFTER_EACH_CHANNEL_CREATION + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE # <<<<<<<<<<<<<< + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + */ + __pyx_v_self->FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE; + + /* "PyCafeDefs.pxi":615 + * self.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION = FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION # <<<<<<<<<<<<<< + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT + * + */ + __pyx_v_self->FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION; + + /* "PyCafeDefs.pxi":616 + * self.FLUSH_AFTER_EACH_MESSAGE = FLUSH_AFTER_EACH_MESSAGE + * self.FLUSH_AFTER_EACH_GROUP_CREATION = FLUSH_AFTER_EACH_GROUP_CREATION + * self.FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT # <<<<<<<<<<<<<< + * + * # ChannelGetCacheWaitPolicyKind: + */ + __pyx_v_self->FLUSH_DESIGNATED_TO_CLIENT = FLUSH_DESIGNATED_TO_CLIENT; + + /* "PyCafeDefs.pxi":619 + * + * # ChannelGetCacheWaitPolicyKind: + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK # <<<<<<<<<<<<<< + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW + */ + __pyx_v_self->GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK; + + /* "PyCafeDefs.pxi":620 + * # ChannelGetCacheWaitPolicyKind: + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT # <<<<<<<<<<<<<< + * self.GET_CACHE_NOW = GET_CACHE_NOW + * self.GET_CACHE_WAIT = GET_CACHE_WAIT + */ + __pyx_v_self->GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT; + + /* "PyCafeDefs.pxi":621 + * self.GET_CACHE_NO_CHECK = GET_CACHE_NO_CHECK + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW # <<<<<<<<<<<<<< + * self.GET_CACHE_WAIT = GET_CACHE_WAIT + * + */ + __pyx_v_self->GET_CACHE_NOW = GET_CACHE_NOW; + + /* "PyCafeDefs.pxi":622 + * self.GET_CACHE_NO_WAIT = GET_CACHE_NO_WAIT + * self.GET_CACHE_NOW = GET_CACHE_NOW + * self.GET_CACHE_WAIT = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * # ChannelGetActionWhenMonitorPolicyKind: + */ + __pyx_v_self->GET_CACHE_WAIT = GET_CACHE_WAIT; + + /* "PyCafeDefs.pxi":625 + * + * # ChannelGetActionWhenMonitorPolicyKind: + * self.GET_FROM_CACHE = GET_FROM_CACHE # <<<<<<<<<<<<<< + * self.GET_FROM_IOC = GET_FROM_IOC + * + */ + __pyx_v_self->GET_FROM_CACHE = GET_FROM_CACHE; + + /* "PyCafeDefs.pxi":626 + * # ChannelGetActionWhenMonitorPolicyKind: + * self.GET_FROM_CACHE = GET_FROM_CACHE + * self.GET_FROM_IOC = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * # ChannelRequestDataTypePolicyKind: + */ + __pyx_v_self->GET_FROM_IOC = GET_FROM_IOC; + + /* "PyCafeDefs.pxi":629 + * + * # ChannelRequestDataTypePolicyKind: + * self.NATIVE_DATATYPE = NATIVE_DATATYPE # <<<<<<<<<<<<<< + * # The smaller in byte size of type requested and native datatype + * self.LOWEST_DATATYPE = LOWEST_DATATYPE + */ + __pyx_v_self->NATIVE_DATATYPE = NATIVE_DATATYPE; + + /* "PyCafeDefs.pxi":631 + * self.NATIVE_DATATYPE = NATIVE_DATATYPE + * # The smaller in byte size of type requested and native datatype + * self.LOWEST_DATATYPE = LOWEST_DATATYPE # <<<<<<<<<<<<<< + * + * # ChannelWaitForResponsePolicyKind: + */ + __pyx_v_self->LOWEST_DATATYPE = LOWEST_DATATYPE; + + /* "PyCafeDefs.pxi":634 + * + * # ChannelWaitForResponsePolicyKind: + * self.BLOCKING = BLOCKING # <<<<<<<<<<<<<< + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING + */ + __pyx_v_self->BLOCKING = BLOCKING; + + /* "PyCafeDefs.pxi":635 + * # ChannelWaitForResponsePolicyKind: + * self.BLOCKING = BLOCKING + * self.WAIT = WAIT # <<<<<<<<<<<<<< + * self.NON_BLOCKING = NON_BLOCKING + * self.NO_WAIT = NO_WAIT + */ + __pyx_v_self->WAIT = WAIT; + + /* "PyCafeDefs.pxi":636 + * self.BLOCKING = BLOCKING + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING # <<<<<<<<<<<<<< + * self.NO_WAIT = NO_WAIT + * + */ + __pyx_v_self->NON_BLOCKING = NON_BLOCKING; + + /* "PyCafeDefs.pxi":637 + * self.WAIT = WAIT + * self.NON_BLOCKING = NON_BLOCKING + * self.NO_WAIT = NO_WAIT # <<<<<<<<<<<<<< + * + * # StatusMessageKind: + */ + __pyx_v_self->NO_WAIT = NO_WAIT; + + /* "PyCafeDefs.pxi":640 + * + * # StatusMessageKind: + * self.NO_MESSAGE = NO_MESSAGE # <<<<<<<<<<<<<< + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST + */ + __pyx_v_self->NO_MESSAGE = NO_MESSAGE; + + /* "PyCafeDefs.pxi":641 + * # StatusMessageKind: + * self.NO_MESSAGE = NO_MESSAGE + * self.PRE_REQUEST = PRE_REQUEST # <<<<<<<<<<<<<< + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND + */ + __pyx_v_self->PRE_REQUEST = PRE_REQUEST; + + /* "PyCafeDefs.pxi":642 + * self.NO_MESSAGE = NO_MESSAGE + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST # <<<<<<<<<<<<<< + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK + */ + __pyx_v_self->FROM_REQUEST = FROM_REQUEST; + + /* "PyCafeDefs.pxi":643 + * self.PRE_REQUEST = PRE_REQUEST + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND # <<<<<<<<<<<<<< + * self.FROM_CALLBACK = FROM_CALLBACK + * self.FROM_MESSAGE = FROM_MESSAGE + */ + __pyx_v_self->FROM_PEND = FROM_PEND; + + /* "PyCafeDefs.pxi":644 + * self.FROM_REQUEST = FROM_REQUEST + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK # <<<<<<<<<<<<<< + * self.FROM_MESSAGE = FROM_MESSAGE + * + */ + __pyx_v_self->FROM_CALLBACK = FROM_CALLBACK; + + /* "PyCafeDefs.pxi":645 + * self.FROM_PEND = FROM_PEND + * self.FROM_CALLBACK = FROM_CALLBACK + * self.FROM_MESSAGE = FROM_MESSAGE # <<<<<<<<<<<<<< + * + * # CallbackProgressKind: + */ + __pyx_v_self->FROM_MESSAGE = FROM_MESSAGE; + + /* "PyCafeDefs.pxi":648 + * + * # CallbackProgressKind: + * self.NOT_INITIATED = NOT_INITIATED # <<<<<<<<<<<<<< + * self.PENDING = PENDING + * self.COMPLETE = COMPLETE + */ + __pyx_v_self->NOT_INITIATED = NOT_INITIATED; + + /* "PyCafeDefs.pxi":649 + * # CallbackProgressKind: + * self.NOT_INITIATED = NOT_INITIATED + * self.PENDING = PENDING # <<<<<<<<<<<<<< + * self.COMPLETE = COMPLETE + * + */ + __pyx_v_self->PENDING = PENDING; + + /* "PyCafeDefs.pxi":650 + * self.NOT_INITIATED = NOT_INITIATED + * self.PENDING = PENDING + * self.COMPLETE = COMPLETE # <<<<<<<<<<<<<< + * + * # deines.h: + */ + __pyx_v_self->COMPLETE = COMPLETE; + + /* "PyCafeDefs.pxi":653 + * + * # deines.h: + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + */ + __pyx_v_self->DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT; + + /* "PyCafeDefs.pxi":654 + * # deines.h: + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + */ + __pyx_v_self->DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO; + + /* "PyCafeDefs.pxi":655 + * self.DEFAULT_TIMEOUT_PEND_EVENT = DEFAULT_TIMEOUT_PEND_EVENT + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING # <<<<<<<<<<<<<< + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + */ + __pyx_v_self->INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING; + + /* "PyCafeDefs.pxi":656 + * self.DEFAULT_TIMEOUT_PEND_IO = DEFAULT_TIMEOUT_PEND_IO + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE # <<<<<<<<<<<<<< + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS + */ + __pyx_v_self->INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE; + + /* "PyCafeDefs.pxi":657 + * self.INVALID_ENUM_RETURN_STRING = INVALID_ENUM_RETURN_STRING + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK # <<<<<<<<<<<<<< + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS + * + */ + __pyx_v_self->BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK; + + /* "PyCafeDefs.pxi":658 + * self.INVALID_ENUM_RETURN_VALUE = INVALID_ENUM_RETURN_VALUE + * self.BSREAD_ZEROMQ_HIGH_WATER_MARK = BSREAD_ZEROMQ_HIGH_WATER_MARK + * self.BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->BSREAD_ZEROMQ_TIMEOUT_MS = BSREAD_ZEROMQ_TIMEOUT_MS; + + /* "PyCafeDefs.pxi":350 + * cdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * + * #self.CY_ECA_TIMEOUT =ECA_TIMEOUT + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":36 + * + * cdef class CyCa: + * cdef readonly unsigned int CY_DBE_VALUE # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBE_LOG + * cdef readonly unsigned int CY_DBE_ARCHIVE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":37 + * cdef class CyCa: + * cdef readonly unsigned int CY_DBE_VALUE + * cdef readonly unsigned int CY_DBE_LOG # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBE_ARCHIVE + * cdef readonly unsigned int CY_DBE_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBE_LOG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_LOG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":38 + * cdef readonly unsigned int CY_DBE_VALUE + * cdef readonly unsigned int CY_DBE_LOG + * cdef readonly unsigned int CY_DBE_ARCHIVE # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBE_ALARM + * cdef readonly unsigned int CY_DBE_PROPERTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBE_ARCHIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_ARCHIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_ARCHIVE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":39 + * cdef readonly unsigned int CY_DBE_LOG + * cdef readonly unsigned int CY_DBE_ARCHIVE + * cdef readonly unsigned int CY_DBE_ALARM # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBE_PROPERTY + * cdef readonly unsigned int CY_DBR_PRIMITIVE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBE_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":40 + * cdef readonly unsigned int CY_DBE_ARCHIVE + * cdef readonly unsigned int CY_DBE_ALARM + * cdef readonly unsigned int CY_DBE_PROPERTY # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_PRIMITIVE + * cdef readonly unsigned int CY_DBR_PLAIN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBE_PROPERTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":41 + * cdef readonly unsigned int CY_DBE_ALARM + * cdef readonly unsigned int CY_DBE_PROPERTY + * cdef readonly unsigned int CY_DBR_PRIMITIVE # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_PLAIN + * cdef readonly unsigned int CY_DBR_STS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PRIMITIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PRIMITIVE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":42 + * cdef readonly unsigned int CY_DBE_PROPERTY + * cdef readonly unsigned int CY_DBR_PRIMITIVE + * cdef readonly unsigned int CY_DBR_PLAIN # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_STS + * cdef readonly unsigned int CY_DBR_TIME + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_PLAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PLAIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PLAIN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":43 + * cdef readonly unsigned int CY_DBR_PRIMITIVE + * cdef readonly unsigned int CY_DBR_PLAIN + * cdef readonly unsigned int CY_DBR_STS # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_TIME + * cdef readonly unsigned int CY_DBR_GR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_STS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":44 + * cdef readonly unsigned int CY_DBR_PLAIN + * cdef readonly unsigned int CY_DBR_STS + * cdef readonly unsigned int CY_DBR_TIME # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_GR + * cdef readonly unsigned int CY_DBR_CTRL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_TIME___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":45 + * cdef readonly unsigned int CY_DBR_STS + * cdef readonly unsigned int CY_DBR_TIME + * cdef readonly unsigned int CY_DBR_GR # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_CTRL + * cdef readonly unsigned int CY_DBR_PUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9CY_DBR_GR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":46 + * cdef readonly unsigned int CY_DBR_TIME + * cdef readonly unsigned int CY_DBR_GR + * cdef readonly unsigned int CY_DBR_CTRL # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_PUT + * cdef readonly unsigned int CY_DBR_STSACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CTRL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":47 + * cdef readonly unsigned int CY_DBR_GR + * cdef readonly unsigned int CY_DBR_CTRL + * cdef readonly unsigned int CY_DBR_PUT # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_STSACK + * cdef readonly unsigned int CY_DBR_CLASS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_PUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_PUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":48 + * cdef readonly unsigned int CY_DBR_CTRL + * cdef readonly unsigned int CY_DBR_PUT + * cdef readonly unsigned int CY_DBR_STSACK # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_CLASS + * cdef readonly unsigned int CY_DBR_NONE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STSACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STSACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STSACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":49 + * cdef readonly unsigned int CY_DBR_PUT + * cdef readonly unsigned int CY_DBR_STSACK + * cdef readonly unsigned int CY_DBR_CLASS # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_NONE + * cdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_CLASS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CLASS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CLASS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":50 + * cdef readonly unsigned int CY_DBR_STSACK + * cdef readonly unsigned int CY_DBR_CLASS + * cdef readonly unsigned int CY_DBR_NONE # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_NONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_NONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_NONE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":51 + * cdef readonly unsigned int CY_DBR_CLASS + * cdef readonly unsigned int CY_DBR_NONE + * cdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + * cdef readonly unsigned int CY_DBR_INT # returns an unsigned short + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":52 + * cdef readonly unsigned int CY_DBR_NONE + * cdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_INT # returns an unsigned short + * # returns an IEEE floating point value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":53 + * cdef readonly unsigned int CY_DBR_STRING # returns a NULL terminated string + * cdef readonly unsigned int CY_DBR_SHORT # returns an unsigned short + * cdef readonly unsigned int CY_DBR_INT # returns an unsigned short # <<<<<<<<<<<<<< + * # returns an IEEE floating point value + * cdef readonly unsigned int CY_DBR_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10CY_DBR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":55 + * cdef readonly unsigned int CY_DBR_INT # returns an unsigned short + * # returns an IEEE floating point value + * cdef readonly unsigned int CY_DBR_FLOAT # <<<<<<<<<<<<<< + * # returns an unsigned short which is the enum item + * cdef readonly unsigned int CY_DBR_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12CY_DBR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":57 + * cdef readonly unsigned int CY_DBR_FLOAT + * # returns an unsigned short which is the enum item + * cdef readonly unsigned int CY_DBR_ENUM # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + * cdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":58 + * # returns an unsigned short which is the enum item + * cdef readonly unsigned int CY_DBR_ENUM + * cdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char # <<<<<<<<<<<<<< + * cdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + * # returns a double precision floating point number + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":59 + * cdef readonly unsigned int CY_DBR_ENUM + * cdef readonly unsigned int CY_DBR_CHAR # returns an unsigned char + * cdef readonly unsigned int CY_DBR_LONG # returns an unsigned long # <<<<<<<<<<<<<< + * # returns a double precision floating point number + * cdef readonly unsigned int CY_DBR_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11CY_DBR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":61 + * cdef readonly unsigned int CY_DBR_LONG # returns an unsigned long + * # returns a double precision floating point number + * cdef readonly unsigned int CY_DBR_DOUBLE # <<<<<<<<<<<<<< + * # returns a string status structure (dbr_sts_string) + * cdef readonly unsigned int CY_DBR_STS_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":63 + * cdef readonly unsigned int CY_DBR_DOUBLE + * # returns a string status structure (dbr_sts_string) + * cdef readonly unsigned int CY_DBR_STS_STRING # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_short) + * cdef readonly unsigned int CY_DBR_STS_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":65 + * cdef readonly unsigned int CY_DBR_STS_STRING + * # returns a short status structure (dbr_sts_short) + * cdef readonly unsigned int CY_DBR_STS_SHORT # <<<<<<<<<<<<<< + * # returns a short status structure (dbr_sts_int) + * cdef readonly unsigned int CY_DBR_STS_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":67 + * cdef readonly unsigned int CY_DBR_STS_SHORT + * # returns a short status structure (dbr_sts_int) + * cdef readonly unsigned int CY_DBR_STS_INT # <<<<<<<<<<<<<< + * # returns a float status structure (dbr_sts_float) + * cdef readonly unsigned int CY_DBR_STS_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_STS_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":69 + * cdef readonly unsigned int CY_DBR_STS_INT + * # returns a float status structure (dbr_sts_float) + * cdef readonly unsigned int CY_DBR_STS_FLOAT # <<<<<<<<<<<<<< + * # returns an enum status structure (dbr_sts_enum) + * cdef readonly unsigned int CY_DBR_STS_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":71 + * cdef readonly unsigned int CY_DBR_STS_FLOAT + * # returns an enum status structure (dbr_sts_enum) + * cdef readonly unsigned int CY_DBR_STS_ENUM # <<<<<<<<<<<<<< + * # returns a char status structure (dbr_sts_char) + * cdef readonly unsigned int CY_DBR_STS_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 71, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":73 + * cdef readonly unsigned int CY_DBR_STS_ENUM + * # returns a char status structure (dbr_sts_char) + * cdef readonly unsigned int CY_DBR_STS_CHAR # <<<<<<<<<<<<<< + * # returns a long status structure (dbr_sts_long) + * cdef readonly unsigned int CY_DBR_STS_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":75 + * cdef readonly unsigned int CY_DBR_STS_CHAR + * # returns a long status structure (dbr_sts_long) + * cdef readonly unsigned int CY_DBR_STS_LONG # <<<<<<<<<<<<<< + * # returns a double status structure (dbr_sts_double) + * cdef readonly unsigned int CY_DBR_STS_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_STS_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":77 + * cdef readonly unsigned int CY_DBR_STS_LONG + * # returns a double status structure (dbr_sts_double) + * cdef readonly unsigned int CY_DBR_STS_DOUBLE # <<<<<<<<<<<<<< + * # returns a string time structure (dbr_time_string) + * cdef readonly unsigned int CY_DBR_TIME_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_STS_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_STS_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":79 + * cdef readonly unsigned int CY_DBR_STS_DOUBLE + * # returns a string time structure (dbr_time_string) + * cdef readonly unsigned int CY_DBR_TIME_STRING # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * cdef readonly unsigned int CY_DBR_TIME_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":81 + * cdef readonly unsigned int CY_DBR_TIME_STRING + * # returns a short time structure (dbr_time_short) + * cdef readonly unsigned int CY_DBR_TIME_SHORT # <<<<<<<<<<<<<< + * # returns a short time structure (dbr_time_short) + * cdef readonly unsigned int CY_DBR_TIME_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":83 + * cdef readonly unsigned int CY_DBR_TIME_SHORT + * # returns a short time structure (dbr_time_short) + * cdef readonly unsigned int CY_DBR_TIME_INT # <<<<<<<<<<<<<< + * # returns a float time structure (dbr_time_float) + * cdef readonly unsigned int CY_DBR_TIME_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_TIME_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":85 + * cdef readonly unsigned int CY_DBR_TIME_INT + * # returns a float time structure (dbr_time_float) + * cdef readonly unsigned int CY_DBR_TIME_FLOAT # <<<<<<<<<<<<<< + * # returns an enum time structure (dbr_time_enum) + * cdef readonly unsigned int CY_DBR_TIME_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":87 + * cdef readonly unsigned int CY_DBR_TIME_FLOAT + * # returns an enum time structure (dbr_time_enum) + * cdef readonly unsigned int CY_DBR_TIME_ENUM # <<<<<<<<<<<<<< + * # returns a char time structure (dbr_time_char) + * cdef readonly unsigned int CY_DBR_TIME_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":89 + * cdef readonly unsigned int CY_DBR_TIME_ENUM + * # returns a char time structure (dbr_time_char) + * cdef readonly unsigned int CY_DBR_TIME_CHAR # <<<<<<<<<<<<<< + * # returns a long time structure (dbr_time_long) + * cdef readonly unsigned int CY_DBR_TIME_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":91 + * cdef readonly unsigned int CY_DBR_TIME_CHAR + * # returns a long time structure (dbr_time_long) + * cdef readonly unsigned int CY_DBR_TIME_LONG # <<<<<<<<<<<<<< + * # returns a double time structure (dbr_time_double) + * cdef readonly unsigned int CY_DBR_TIME_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_TIME_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":93 + * cdef readonly unsigned int CY_DBR_TIME_LONG + * # returns a double time structure (dbr_time_double) + * cdef readonly unsigned int CY_DBR_TIME_DOUBLE # <<<<<<<<<<<<<< + * # returns a graphic string structure (dbr_gr_string) + * cdef readonly unsigned int CY_DBR_GR_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_TIME_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_TIME_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":95 + * cdef readonly unsigned int CY_DBR_TIME_DOUBLE + * # returns a graphic string structure (dbr_gr_string) + * cdef readonly unsigned int CY_DBR_GR_STRING # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_short) + * cdef readonly unsigned int CY_DBR_GR_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":97 + * cdef readonly unsigned int CY_DBR_GR_STRING + * # returns a graphic short structure (dbr_gr_short) + * cdef readonly unsigned int CY_DBR_GR_SHORT # <<<<<<<<<<<<<< + * # returns a graphic short structure (dbr_gr_int) + * cdef readonly unsigned int CY_DBR_GR_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":99 + * cdef readonly unsigned int CY_DBR_GR_SHORT + * # returns a graphic short structure (dbr_gr_int) + * cdef readonly unsigned int CY_DBR_GR_INT # <<<<<<<<<<<<<< + * # returns a graphic float structure (dbr_gr_float) + * cdef readonly unsigned int CY_DBR_GR_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_DBR_GR_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":101 + * cdef readonly unsigned int CY_DBR_GR_INT + * # returns a graphic float structure (dbr_gr_float) + * cdef readonly unsigned int CY_DBR_GR_FLOAT # <<<<<<<<<<<<<< + * # returns a graphic enum structure (dbr_gr_enum) + * cdef readonly unsigned int CY_DBR_GR_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":103 + * cdef readonly unsigned int CY_DBR_GR_FLOAT + * # returns a graphic enum structure (dbr_gr_enum) + * cdef readonly unsigned int CY_DBR_GR_ENUM # <<<<<<<<<<<<<< + * # returns a graphic char structure (dbr_gr_char) + * cdef readonly unsigned int CY_DBR_GR_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":105 + * cdef readonly unsigned int CY_DBR_GR_ENUM + * # returns a graphic char structure (dbr_gr_char) + * cdef readonly unsigned int CY_DBR_GR_CHAR # <<<<<<<<<<<<<< + * # returns a graphic long structure (dbr_gr_long) + * cdef readonly unsigned int CY_DBR_GR_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":107 + * cdef readonly unsigned int CY_DBR_GR_CHAR + * # returns a graphic long structure (dbr_gr_long) + * cdef readonly unsigned int CY_DBR_GR_LONG # <<<<<<<<<<<<<< + * # returns a graphic double structure (dbr_gr_double) + * cdef readonly unsigned int CY_DBR_GR_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_DBR_GR_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":109 + * cdef readonly unsigned int CY_DBR_GR_LONG + * # returns a graphic double structure (dbr_gr_double) + * cdef readonly unsigned int CY_DBR_GR_DOUBLE # <<<<<<<<<<<<<< + * # returns a control string structure (dbr_ctrl_int) + * cdef readonly unsigned int CY_DBR_CTRL_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_GR_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_GR_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":111 + * cdef readonly unsigned int CY_DBR_GR_DOUBLE + * # returns a control string structure (dbr_ctrl_int) + * cdef readonly unsigned int CY_DBR_CTRL_STRING # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_short) + * cdef readonly unsigned int CY_DBR_CTRL_SHORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":113 + * cdef readonly unsigned int CY_DBR_CTRL_STRING + * # returns a control short structure (dbr_ctrl_short) + * cdef readonly unsigned int CY_DBR_CTRL_SHORT # <<<<<<<<<<<<<< + * # returns a control short structure (dbr_ctrl_int) + * cdef readonly unsigned int CY_DBR_CTRL_INT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_SHORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_SHORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":115 + * cdef readonly unsigned int CY_DBR_CTRL_SHORT + * # returns a control short structure (dbr_ctrl_int) + * cdef readonly unsigned int CY_DBR_CTRL_INT # <<<<<<<<<<<<<< + * # returns a control float structure (dbr_ctrl_float) + * cdef readonly unsigned int CY_DBR_CTRL_FLOAT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_DBR_CTRL_INT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_INT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":117 + * cdef readonly unsigned int CY_DBR_CTRL_INT + * # returns a control float structure (dbr_ctrl_float) + * cdef readonly unsigned int CY_DBR_CTRL_FLOAT # <<<<<<<<<<<<<< + * # returns a control enum structure (dbr_ctrl_enum) + * cdef readonly unsigned int CY_DBR_CTRL_ENUM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_FLOAT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":119 + * cdef readonly unsigned int CY_DBR_CTRL_FLOAT + * # returns a control enum structure (dbr_ctrl_enum) + * cdef readonly unsigned int CY_DBR_CTRL_ENUM # <<<<<<<<<<<<<< + * # returns a control char structure (dbr_ctrl_char) + * cdef readonly unsigned int CY_DBR_CTRL_CHAR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_ENUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_ENUM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":121 + * cdef readonly unsigned int CY_DBR_CTRL_ENUM + * # returns a control char structure (dbr_ctrl_char) + * cdef readonly unsigned int CY_DBR_CTRL_CHAR # <<<<<<<<<<<<<< + * # returns a control long structure (dbr_ctrl_long) + * cdef readonly unsigned int CY_DBR_CTRL_LONG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_CHAR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":123 + * cdef readonly unsigned int CY_DBR_CTRL_CHAR + * # returns a control long structure (dbr_ctrl_long) + * cdef readonly unsigned int CY_DBR_CTRL_LONG # <<<<<<<<<<<<<< + * # returns a control double structure (dbr_ctrl_double) + * cdef readonly unsigned int CY_DBR_CTRL_DOUBLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_LONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_LONG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":125 + * cdef readonly unsigned int CY_DBR_CTRL_LONG + * # returns a control double structure (dbr_ctrl_double) + * cdef readonly unsigned int CY_DBR_CTRL_DOUBLE # <<<<<<<<<<<<<< + * + * # cdef readonly int CY_ECA_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->CY_DBR_CTRL_DOUBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_DBR_CTRL_DOUBLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":129 + * # cdef readonly int CY_ECA_TIMEOUT + * + * cdef readonly int CY_ECA_NORMAL # 1 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_ALLOCMEM # 48 + * cdef readonly int CY_ECA_TOLARGE # 72 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NORMAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":130 + * + * cdef readonly int CY_ECA_NORMAL # 1 + * cdef readonly int CY_ECA_ALLOCMEM # 48 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_TOLARGE # 72 + * cdef readonly int CY_ECA_TIMEOUT # 80 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":131 + * cdef readonly int CY_ECA_NORMAL # 1 + * cdef readonly int CY_ECA_ALLOCMEM # 48 + * cdef readonly int CY_ECA_TOLARGE # 72 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_TIMEOUT # 80 + * cdef readonly int CY_ECA_BADTYPE # 114 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TOLARGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_TOLARGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_TOLARGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":132 + * cdef readonly int CY_ECA_ALLOCMEM # 48 + * cdef readonly int CY_ECA_TOLARGE # 72 + * cdef readonly int CY_ECA_TIMEOUT # 80 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADTYPE # 114 + * cdef readonly int CY_ECA_INTERNAL # 142 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":133 + * cdef readonly int CY_ECA_TOLARGE # 72 + * cdef readonly int CY_ECA_TIMEOUT # 80 + * cdef readonly int CY_ECA_BADTYPE # 114 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_INTERNAL # 142 + * cdef readonly int CY_ECA_GETFAIL # 152 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADTYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":134 + * cdef readonly int CY_ECA_TIMEOUT # 80 + * cdef readonly int CY_ECA_BADTYPE # 114 + * cdef readonly int CY_ECA_INTERNAL # 142 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_GETFAIL # 152 + * cdef readonly int CY_ECA_PUTFAIL # 160 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_INTERNAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_INTERNAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_INTERNAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":135 + * cdef readonly int CY_ECA_BADTYPE # 114 + * cdef readonly int CY_ECA_INTERNAL # 142 + * cdef readonly int CY_ECA_GETFAIL # 152 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_PUTFAIL # 160 + * cdef readonly int CY_ECA_BADCOUNT # 176 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_GETFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_GETFAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_GETFAIL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":136 + * cdef readonly int CY_ECA_INTERNAL # 142 + * cdef readonly int CY_ECA_GETFAIL # 152 + * cdef readonly int CY_ECA_PUTFAIL # 160 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADCOUNT # 176 + * cdef readonly int CY_ECA_BADSTR # 186 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_PUTFAIL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_PUTFAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_PUTFAIL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":137 + * cdef readonly int CY_ECA_GETFAIL # 152 + * cdef readonly int CY_ECA_PUTFAIL # 160 + * cdef readonly int CY_ECA_BADCOUNT # 176 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADSTR # 186 + * cdef readonly int CY_ECA_DISCONN # 192 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":138 + * cdef readonly int CY_ECA_PUTFAIL # 160 + * cdef readonly int CY_ECA_BADCOUNT # 176 + * cdef readonly int CY_ECA_BADSTR # 186 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_DISCONN # 192 + * cdef readonly int CY_ECA_DBLCHNL # 200 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADSTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADSTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":139 + * cdef readonly int CY_ECA_BADCOUNT # 176 + * cdef readonly int CY_ECA_BADSTR # 186 + * cdef readonly int CY_ECA_DISCONN # 192 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_DBLCHNL # 200 + * cdef readonly int CY_ECA_EVDISALLOW # 210 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_DISCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_DISCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":140 + * cdef readonly int CY_ECA_BADSTR # 186 + * cdef readonly int CY_ECA_DISCONN # 192 + * cdef readonly int CY_ECA_DBLCHNL # 200 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_EVDISALLOW # 210 + * cdef readonly int CY_ECA_BADMONID # 242 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_DBLCHNL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_DBLCHNL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_DBLCHNL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":141 + * cdef readonly int CY_ECA_DISCONN # 192 + * cdef readonly int CY_ECA_DBLCHNL # 200 + * cdef readonly int CY_ECA_EVDISALLOW # 210 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADMONID # 242 + * cdef readonly int CY_ECA_BADMASK # 330 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_EVDISALLOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_EVDISALLOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":142 + * cdef readonly int CY_ECA_DBLCHNL # 200 + * cdef readonly int CY_ECA_EVDISALLOW # 210 + * cdef readonly int CY_ECA_BADMONID # 242 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADMASK # 330 + * cdef readonly int CY_ECA_IODONE # 339 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15CY_ECA_BADMONID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADMONID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADMONID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":143 + * cdef readonly int CY_ECA_EVDISALLOW # 210 + * cdef readonly int CY_ECA_BADMONID # 242 + * cdef readonly int CY_ECA_BADMASK # 330 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_IODONE # 339 + * cdef readonly int CY_ECA_IOINPROGRESS # 347 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADMASK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADMASK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADMASK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":144 + * cdef readonly int CY_ECA_BADMONID # 242 + * cdef readonly int CY_ECA_BADMASK # 330 + * cdef readonly int CY_ECA_IODONE # 339 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_IOINPROGRESS # 347 + * cdef readonly int CY_ECA_BADSYNCGRP # 354 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13CY_ECA_IODONE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_IODONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_IODONE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":145 + * cdef readonly int CY_ECA_BADMASK # 330 + * cdef readonly int CY_ECA_IODONE # 339 + * cdef readonly int CY_ECA_IOINPROGRESS # 347 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADSYNCGRP # 354 + * cdef readonly int CY_ECA_PUTCBINPROG # 362 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_IOINPROGRESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_IOINPROGRESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":146 + * cdef readonly int CY_ECA_IODONE # 339 + * cdef readonly int CY_ECA_IOINPROGRESS # 347 + * cdef readonly int CY_ECA_BADSYNCGRP # 354 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_PUTCBINPROG # 362 + * cdef readonly int CY_ECA_NORDACCESS # 368 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADSYNCGRP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADSYNCGRP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":147 + * cdef readonly int CY_ECA_IOINPROGRESS # 347 + * cdef readonly int CY_ECA_BADSYNCGRP # 354 + * cdef readonly int CY_ECA_PUTCBINPROG # 362 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_NORDACCESS # 368 + * cdef readonly int CY_ECA_NOWTACCESS # 376 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_PUTCBINPROG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_PUTCBINPROG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":148 + * cdef readonly int CY_ECA_BADSYNCGRP # 354 + * cdef readonly int CY_ECA_PUTCBINPROG # 362 + * cdef readonly int CY_ECA_NORDACCESS # 368 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_NOWTACCESS # 376 + * cdef readonly int CY_ECA_ANACHRONISM # 386 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NORDACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NORDACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":149 + * cdef readonly int CY_ECA_PUTCBINPROG # 362 + * cdef readonly int CY_ECA_NORDACCESS # 368 + * cdef readonly int CY_ECA_NOWTACCESS # 376 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_ANACHRONISM # 386 + * cdef readonly int CY_ECA_NOSEARCHADDR # 392 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOWTACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOWTACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":150 + * cdef readonly int CY_ECA_NORDACCESS # 368 + * cdef readonly int CY_ECA_NOWTACCESS # 376 + * cdef readonly int CY_ECA_ANACHRONISM # 386 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cdef readonly int CY_ECA_NOCONVERT # 400 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ANACHRONISM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ANACHRONISM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":151 + * cdef readonly int CY_ECA_NOWTACCESS # 376 + * cdef readonly int CY_ECA_ANACHRONISM # 386 + * cdef readonly int CY_ECA_NOSEARCHADDR # 392 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_NOCONVERT # 400 + * cdef readonly int CY_ECA_BADCHID # 410 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOSEARCHADDR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOSEARCHADDR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":152 + * cdef readonly int CY_ECA_ANACHRONISM # 386 + * cdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cdef readonly int CY_ECA_NOCONVERT # 400 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADCHID # 410 + * cdef readonly int CY_ECA_BADFUNCPTR # 418 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_NOCONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOCONVERT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOCONVERT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":153 + * cdef readonly int CY_ECA_NOSEARCHADDR # 392 + * cdef readonly int CY_ECA_NOCONVERT # 400 + * cdef readonly int CY_ECA_BADCHID # 410 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADFUNCPTR # 418 + * cdef readonly int CY_ECA_ISATTACHED # 424 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14CY_ECA_BADCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADCHID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADCHID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":154 + * cdef readonly int CY_ECA_NOCONVERT # 400 + * cdef readonly int CY_ECA_BADCHID # 410 + * cdef readonly int CY_ECA_BADFUNCPTR # 418 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_ISATTACHED # 424 + * cdef readonly int CY_ECA_UNAVAILINSERV # 432 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADFUNCPTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADFUNCPTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":155 + * cdef readonly int CY_ECA_BADCHID # 410 + * cdef readonly int CY_ECA_BADFUNCPTR # 418 + * cdef readonly int CY_ECA_ISATTACHED # 424 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cdef readonly int CY_ECA_CHANDESTROY # 440 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_ISATTACHED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_ISATTACHED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_ISATTACHED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":156 + * cdef readonly int CY_ECA_BADFUNCPTR # 418 + * cdef readonly int CY_ECA_ISATTACHED # 424 + * cdef readonly int CY_ECA_UNAVAILINSERV # 432 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_CHANDESTROY # 440 + * cdef readonly int CY_ECA_BADPRIORITY # 450 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_UNAVAILINSERV); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_UNAVAILINSERV.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":157 + * cdef readonly int CY_ECA_ISATTACHED # 424 + * cdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cdef readonly int CY_ECA_CHANDESTROY # 440 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_BADPRIORITY # 450 + * cdef readonly int CY_ECA_NOTTHREADED # 458 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_CHANDESTROY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_CHANDESTROY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":158 + * cdef readonly int CY_ECA_UNAVAILINSERV # 432 + * cdef readonly int CY_ECA_CHANDESTROY # 440 + * cdef readonly int CY_ECA_BADPRIORITY # 450 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_NOTTHREADED # 458 + * cdef readonly int CY_ECA_16KARRAYCLIENT # 464 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_BADPRIORITY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_BADPRIORITY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":159 + * cdef readonly int CY_ECA_CHANDESTROY # 440 + * cdef readonly int CY_ECA_BADPRIORITY # 450 + * cdef readonly int CY_ECA_NOTTHREADED # 458 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cdef readonly int CY_ECA_CONNSEQTMO # 472 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_NOTTHREADED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_NOTTHREADED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":160 + * cdef readonly int CY_ECA_BADPRIORITY # 450 + * cdef readonly int CY_ECA_NOTTHREADED # 458 + * cdef readonly int CY_ECA_16KARRAYCLIENT # 464 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_CONNSEQTMO # 472 + * cdef readonly int CY_ECA_UNRESPTMO # 480 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_16KARRAYCLIENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_16KARRAYCLIENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":161 + * cdef readonly int CY_ECA_NOTTHREADED # 458 + * cdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cdef readonly int CY_ECA_CONNSEQTMO # 472 # <<<<<<<<<<<<<< + * cdef readonly int CY_ECA_UNRESPTMO # 480 + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_CONNSEQTMO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_CONNSEQTMO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":162 + * cdef readonly int CY_ECA_16KARRAYCLIENT # 464 + * cdef readonly int CY_ECA_CONNSEQTMO # 472 + * cdef readonly int CY_ECA_UNRESPTMO # 480 # <<<<<<<<<<<<<< + * + * cdef readonly int ICAFE_CS_NEVER_CONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CY_ECA_UNRESPTMO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.CY_ECA_UNRESPTMO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":164 + * cdef readonly int CY_ECA_UNRESPTMO # 480 + * + * cdef readonly int ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CS_PREV_CONN + * cdef readonly int ICAFE_CS_CONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_NEVER_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_NEVER_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":165 + * + * cdef readonly int ICAFE_CS_NEVER_CONN + * cdef readonly int ICAFE_CS_PREV_CONN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CS_CONN + * cdef readonly int ICAFE_CS_CLOSED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_PREV_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_PREV_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":166 + * cdef readonly int ICAFE_CS_NEVER_CONN + * cdef readonly int ICAFE_CS_PREV_CONN + * cdef readonly int ICAFE_CS_CONN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CS_CLOSED + * cdef readonly int ICAFE_CS_DISCONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_CS_CONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_CONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_CONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":167 + * cdef readonly int ICAFE_CS_PREV_CONN + * cdef readonly int ICAFE_CS_CONN + * cdef readonly int ICAFE_CS_CLOSED # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CS_DISCONN + * cdef readonly int ICAFE_CS_UNKNOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CS_CLOSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_CLOSED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_CLOSED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":168 + * cdef readonly int ICAFE_CS_CONN + * cdef readonly int ICAFE_CS_CLOSED + * cdef readonly int ICAFE_CS_DISCONN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CS_UNKNOWN + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_DISCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_DISCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_DISCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":169 + * cdef readonly int ICAFE_CS_CLOSED + * cdef readonly int ICAFE_CS_DISCONN + * cdef readonly int ICAFE_CS_UNKNOWN # <<<<<<<<<<<<<< + * + * cdef readonly int ICAFE_TYPENOTCONN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CS_UNKNOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CS_UNKNOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":171 + * cdef readonly int ICAFE_CS_UNKNOWN + * + * cdef readonly int ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_RULE_FALSE + * cdef readonly int ICAFE_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_TYPENOTCONN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":172 + * + * cdef readonly int ICAFE_TYPENOTCONN + * cdef readonly int ICAFE_RULE_FALSE # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_BADCOUNT + * cdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_RULE_FALSE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_RULE_FALSE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":173 + * cdef readonly int ICAFE_TYPENOTCONN + * cdef readonly int ICAFE_RULE_FALSE + * cdef readonly int ICAFE_BADCOUNT # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ICAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":174 + * cdef readonly int ICAFE_RULE_FALSE + * cdef readonly int ICAFE_BADCOUNT + * cdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cdef readonly int ICAFE_CACHE_EMPTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CALLBACK_NOT_YET_INVOKED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CALLBACK_NOT_YET_INVOKED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":175 + * cdef readonly int ICAFE_BADCOUNT + * cdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CACHE_EMPTY + * cdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_WAITING_FOR_PREV_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_WAITING_FOR_PREV_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":176 + * cdef readonly int ICAFE_CALLBACK_NOT_YET_INVOKED + * cdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cdef readonly int ICAFE_CACHE_EMPTY # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CACHE_EMPTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CACHE_EMPTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":177 + * cdef readonly int ICAFE_WAITING_FOR_PREV_CALLBACK + * cdef readonly int ICAFE_CACHE_EMPTY + * cdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":178 + * cdef readonly int ICAFE_CACHE_EMPTY + * cdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * cdef readonly int ICAFE_SET_AND_GET_MISMATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_MONITOR_DELAYED_AS_CONN_DOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_MONITOR_DELAYED_AS_CONN_DOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":179 + * cdef readonly int ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT + * cdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_SET_AND_GET_MISMATCH + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":180 + * cdef readonly int ICAFE_MONITOR_DELAYED_AS_CONN_DOWN + * cdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * cdef readonly int ICAFE_SET_AND_GET_MISMATCH # <<<<<<<<<<<<<< + * + * cdef readonly int ICAFE_CA_OP_GET + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_SET_AND_GET_MISMATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_SET_AND_GET_MISMATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":182 + * cdef readonly int ICAFE_SET_AND_GET_MISMATCH + * + * cdef readonly int ICAFE_CA_OP_GET # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_PUT + * cdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_GET___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_GET); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_GET.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":183 + * + * cdef readonly int ICAFE_CA_OP_GET + * cdef readonly int ICAFE_CA_OP_PUT # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cdef readonly int ICAFE_CA_OP_ADD_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_PUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_PUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":184 + * cdef readonly int ICAFE_CA_OP_GET + * cdef readonly int ICAFE_CA_OP_PUT + * cdef readonly int ICAFE_CA_OP_CREATE_CHANNEL # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_ADD_EVENT + * cdef readonly int ICAFE_CA_OP_CLEAR_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CREATE_CHANNEL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CREATE_CHANNEL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":185 + * cdef readonly int ICAFE_CA_OP_PUT + * cdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cdef readonly int ICAFE_CA_OP_ADD_EVENT # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cdef readonly int ICAFE_CA_OP_OTHER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_ADD_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_ADD_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":186 + * cdef readonly int ICAFE_CA_OP_CREATE_CHANNEL + * cdef readonly int ICAFE_CA_OP_ADD_EVENT + * cdef readonly int ICAFE_CA_OP_CLEAR_EVENT # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_OTHER + * cdef readonly int ICAFE_CA_OP_CONN_DOWN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CLEAR_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CLEAR_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":187 + * cdef readonly int ICAFE_CA_OP_ADD_EVENT + * cdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cdef readonly int ICAFE_CA_OP_OTHER # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_CONN_DOWN + * cdef readonly int ICAFE_CA_OP_CONN_UP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_OTHER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_OTHER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":188 + * cdef readonly int ICAFE_CA_OP_CLEAR_EVENT + * cdef readonly int ICAFE_CA_OP_OTHER + * cdef readonly int ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_CA_OP_CONN_UP + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CONN_DOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CONN_DOWN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":189 + * cdef readonly int ICAFE_CA_OP_OTHER + * cdef readonly int ICAFE_CA_OP_CONN_DOWN + * cdef readonly int ICAFE_CA_OP_CONN_UP # <<<<<<<<<<<<<< + * + * cdef readonly int ICAFE_DAQ_RUN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_CA_OP_CONN_UP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_CA_OP_CONN_UP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":191 + * cdef readonly int ICAFE_CA_OP_CONN_UP + * + * cdef readonly int ICAFE_DAQ_RUN # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_DAQ_PAUSED + * cdef readonly int ICAFE_DAQ_STOPPED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_DAQ_RUN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_RUN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_RUN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":192 + * + * cdef readonly int ICAFE_DAQ_RUN + * cdef readonly int ICAFE_DAQ_PAUSED # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_DAQ_STOPPED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_PAUSED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_PAUSED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":193 + * cdef readonly int ICAFE_DAQ_RUN + * cdef readonly int ICAFE_DAQ_PAUSED + * cdef readonly int ICAFE_DAQ_STOPPED # <<<<<<<<<<<<<< + * + * cdef readonly int ECAFE_LOAD_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_DAQ_STOPPED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_DAQ_STOPPED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":195 + * cdef readonly int ICAFE_DAQ_STOPPED + * + * cdef readonly int ECAFE_LOAD_COLLECTION # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_LOAD_GROUP + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_LOAD_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_LOAD_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":196 + * + * cdef readonly int ECAFE_LOAD_COLLECTION + * cdef readonly int ECAFE_LOAD_GROUP # <<<<<<<<<<<<<< + * + * cdef readonly int ICAFE_NORMAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_LOAD_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_LOAD_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":198 + * cdef readonly int ECAFE_LOAD_GROUP + * + * cdef readonly int ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef readonly int ICAFE_SUCCESS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ICAFE_NORMAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_NORMAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":199 + * + * cdef readonly int ICAFE_NORMAL + * cdef readonly int ICAFE_SUCCESS # <<<<<<<<<<<<<< + * + * cdef readonly int ECAFE_NODATA + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ICAFE_SUCCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ICAFE_SUCCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ICAFE_SUCCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":201 + * cdef readonly int ICAFE_SUCCESS + * + * cdef readonly int ECAFE_NODATA # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_TYPE + * cdef readonly int ECAFE_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NODATA); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NODATA.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":202 + * + * cdef readonly int ECAFE_NODATA + * cdef readonly int ECAFE_INVALID_TYPE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BADCOUNT + * cdef readonly int ECAFE_BADSTR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_TYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":203 + * cdef readonly int ECAFE_NODATA + * cdef readonly int ECAFE_INVALID_TYPE + * cdef readonly int ECAFE_BADCOUNT # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BADSTR + * cdef readonly int ECAFE_BADTYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":204 + * cdef readonly int ECAFE_INVALID_TYPE + * cdef readonly int ECAFE_BADCOUNT + * cdef readonly int ECAFE_BADSTR # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BADTYPE + * cdef readonly int ECAFE_NO_CONVERT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ECAFE_BADSTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADSTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADSTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":205 + * cdef readonly int ECAFE_BADCOUNT + * cdef readonly int ECAFE_BADSTR + * cdef readonly int ECAFE_BADTYPE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NO_CONVERT + * cdef readonly int ECAFE_NULLCONTEXT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_BADTYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BADTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BADTYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":206 + * cdef readonly int ECAFE_BADSTR + * cdef readonly int ECAFE_BADTYPE + * cdef readonly int ECAFE_NO_CONVERT # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NULLCONTEXT + * cdef readonly int ECAFE_NULLCHID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NO_CONVERT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NO_CONVERT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NO_CONVERT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":207 + * cdef readonly int ECAFE_BADTYPE + * cdef readonly int ECAFE_NO_CONVERT + * cdef readonly int ECAFE_NULLCONTEXT # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NULLCHID + * cdef readonly int ECAFE_NULLEVID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLCONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLCONTEXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":208 + * cdef readonly int ECAFE_NO_CONVERT + * cdef readonly int ECAFE_NULLCONTEXT + * cdef readonly int ECAFE_NULLCHID # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NULLEVID + * cdef readonly int ECAFE_UNKNOWN_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLCHID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLCHID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLCHID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":209 + * cdef readonly int ECAFE_NULLCONTEXT + * cdef readonly int ECAFE_NULLCHID + * cdef readonly int ECAFE_NULLEVID # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_UNKNOWN_COLLECTION + * cdef readonly int ECAFE_EMPTY_COLLECTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ECAFE_NULLEVID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NULLEVID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NULLEVID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":210 + * cdef readonly int ECAFE_NULLCHID + * cdef readonly int ECAFE_NULLEVID + * cdef readonly int ECAFE_UNKNOWN_COLLECTION # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_EMPTY_COLLECTION + * cdef readonly int ECAFE_COLLECTION_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_UNKNOWN_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_UNKNOWN_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":211 + * cdef readonly int ECAFE_NULLEVID + * cdef readonly int ECAFE_UNKNOWN_COLLECTION + * cdef readonly int ECAFE_EMPTY_COLLECTION # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_COLLECTION_PREV_DEF + * cdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_EMPTY_COLLECTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_EMPTY_COLLECTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":212 + * cdef readonly int ECAFE_UNKNOWN_COLLECTION + * cdef readonly int ECAFE_EMPTY_COLLECTION + * cdef readonly int ECAFE_COLLECTION_PREV_DEF # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cdef readonly int ECAFE_RULE_FALSE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_COLLECTION_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_COLLECTION_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":213 + * cdef readonly int ECAFE_EMPTY_COLLECTION + * cdef readonly int ECAFE_COLLECTION_PREV_DEF + * cdef readonly int ECAFE_COLLECTION_INVALID_MEMBER # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_RULE_FALSE + * cdef readonly int ECAFE_UNKNOWN_GROUP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_COLLECTION_INVALID_MEMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_COLLECTION_INVALID_MEMBER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":214 + * cdef readonly int ECAFE_COLLECTION_PREV_DEF + * cdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cdef readonly int ECAFE_RULE_FALSE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_UNKNOWN_GROUP + * cdef readonly int ECAFE_EMPTY_GROUP + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_RULE_FALSE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_RULE_FALSE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_RULE_FALSE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":215 + * cdef readonly int ECAFE_COLLECTION_INVALID_MEMBER + * cdef readonly int ECAFE_RULE_FALSE + * cdef readonly int ECAFE_UNKNOWN_GROUP # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_EMPTY_GROUP + * cdef readonly int ECAFE_GROUP_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_UNKNOWN_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_UNKNOWN_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":216 + * cdef readonly int ECAFE_RULE_FALSE + * cdef readonly int ECAFE_UNKNOWN_GROUP + * cdef readonly int ECAFE_EMPTY_GROUP # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_GROUP_PREV_DEF + * cdef readonly int ECAFE_INVALID_HANDLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_EMPTY_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_EMPTY_GROUP.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":217 + * cdef readonly int ECAFE_UNKNOWN_GROUP + * cdef readonly int ECAFE_EMPTY_GROUP + * cdef readonly int ECAFE_GROUP_PREV_DEF # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_HANDLE + * cdef readonly int ECAFE_INVALID_GROUP_HANDLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_GROUP_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_GROUP_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":218 + * cdef readonly int ECAFE_EMPTY_GROUP + * cdef readonly int ECAFE_GROUP_PREV_DEF + * cdef readonly int ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cdef readonly int ECAFE_NORDACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_HANDLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":219 + * cdef readonly int ECAFE_GROUP_PREV_DEF + * cdef readonly int ECAFE_INVALID_HANDLE + * cdef readonly int ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NORDACCESS + * cdef readonly int ECAFE_NOWTACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_GROUP_HANDLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_GROUP_HANDLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":220 + * cdef readonly int ECAFE_INVALID_HANDLE + * cdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cdef readonly int ECAFE_NORDACCESS # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_NOWTACCESS + * cdef readonly int ECAFE_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NORDACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NORDACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NORDACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":221 + * cdef readonly int ECAFE_INVALID_GROUP_HANDLE + * cdef readonly int ECAFE_NORDACCESS + * cdef readonly int ECAFE_NOWTACCESS # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_TIMEOUT + * cdef readonly int ECAFE_CANNOT_OPEN_FILE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16ECAFE_NOWTACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_NOWTACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_NOWTACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":222 + * cdef readonly int ECAFE_NORDACCESS + * cdef readonly int ECAFE_NOWTACCESS + * cdef readonly int ECAFE_TIMEOUT # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_CANNOT_OPEN_FILE + * cdef readonly int ECAFE_INVALID_SWITCH_CASE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13ECAFE_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":223 + * cdef readonly int ECAFE_NOWTACCESS + * cdef readonly int ECAFE_TIMEOUT + * cdef readonly int ECAFE_CANNOT_OPEN_FILE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_SWITCH_CASE + * cdef readonly int ECAFE_PVALIAS_PREV_DEF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_CANNOT_OPEN_FILE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_CANNOT_OPEN_FILE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":224 + * cdef readonly int ECAFE_TIMEOUT + * cdef readonly int ECAFE_CANNOT_OPEN_FILE + * cdef readonly int ECAFE_INVALID_SWITCH_CASE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_PVALIAS_PREV_DEF + * cdef readonly int ECAFE_PVALIAS_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_SWITCH_CASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_SWITCH_CASE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":225 + * cdef readonly int ECAFE_CANNOT_OPEN_FILE + * cdef readonly int ECAFE_INVALID_SWITCH_CASE + * cdef readonly int ECAFE_PVALIAS_PREV_DEF # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_PVALIAS_INVALID + * cdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVALIAS_PREV_DEF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVALIAS_PREV_DEF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":226 + * cdef readonly int ECAFE_INVALID_SWITCH_CASE + * cdef readonly int ECAFE_PVALIAS_PREV_DEF + * cdef readonly int ECAFE_PVALIAS_INVALID # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVALIAS_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVALIAS_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":227 + * cdef readonly int ECAFE_PVALIAS_PREV_DEF + * cdef readonly int ECAFE_PVALIAS_INVALID + * cdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVNAME_PREV_DEF_AS_PVALIAS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVNAME_PREV_DEF_AS_PVALIAS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":228 + * cdef readonly int ECAFE_PVALIAS_INVALID + * cdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cdef readonly int ECAFE_WRONG_CA_CONTEXT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_DEVICE_ATTRIB_NOT_FOUND); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_DEVICE_ATTRIB_NOT_FOUND.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":229 + * cdef readonly int ECAFE_PVNAME_PREV_DEF_AS_PVALIAS + * cdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cdef readonly int ECAFE_HASH_UNIQUEID_EXISTS # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_WRONG_CA_CONTEXT + * cdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_HASH_UNIQUEID_EXISTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_HASH_UNIQUEID_EXISTS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":230 + * cdef readonly int ECAFE_DEVICE_ATTRIB_NOT_FOUND + * cdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cdef readonly int ECAFE_WRONG_CA_CONTEXT # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_WRONG_CA_CONTEXT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_WRONG_CA_CONTEXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":231 + * cdef readonly int ECAFE_HASH_UNIQUEID_EXISTS + * cdef readonly int ECAFE_WRONG_CA_CONTEXT + * cdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cdef readonly int ECAFE_INVALID_ENUM_INDEX + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_CAFENUM_POLICY_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_CAFENUM_POLICY_TYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":232 + * cdef readonly int ECAFE_WRONG_CA_CONTEXT + * cdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INVALID_ENUM_INDEX + * cdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":233 + * cdef readonly int ECAFE_INVALID_CAFENUM_POLICY_TYPE + * cdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cdef readonly int ECAFE_INVALID_ENUM_INDEX # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INVALID_ENUM_INDEX); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INVALID_ENUM_INDEX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":234 + * cdef readonly int ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED + * cdef readonly int ECAFE_INVALID_ENUM_INDEX + * cdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_PVGROUP_GROUPHANDLE_MISMATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_PVGROUP_GROUPHANDLE_MISMATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":235 + * cdef readonly int ECAFE_INVALID_ENUM_INDEX + * cdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * cdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_TIMEOUT_SET_AND_MATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_TIMEOUT_SET_AND_MATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":236 + * cdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_HANDLE_MISMATCH_SET_AND_MATCH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_HANDLE_MISMATCH_SET_AND_MATCH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":237 + * cdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH + * cdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED # <<<<<<<<<<<<<< + * + * cdef readonly int ECAFE_BPM_DATA_IS_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_INCONSISTENT_CONTAINER_CORRECTED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_INCONSISTENT_CONTAINER_CORRECTED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":239 + * cdef readonly int ECAFE_INCONSISTENT_CONTAINER_CORRECTED + * + * cdef readonly int ECAFE_BPM_DATA_IS_INVALID # <<<<<<<<<<<<<< + * + * cdef readonly int ECAFE_BITSHUFF_DECOMPRESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BPM_DATA_IS_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BPM_DATA_IS_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":241 + * cdef readonly int ECAFE_BPM_DATA_IS_INVALID + * + * cdef readonly int ECAFE_BITSHUFF_DECOMPRESS # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cdef readonly int ECAFE_BITSHUFF_REALLOCMEM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_DECOMPRESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_DECOMPRESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":242 + * + * cdef readonly int ECAFE_BITSHUFF_DECOMPRESS + * cdef readonly int ECAFE_BITSHUFF_ALLOCMEM # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BITSHUFF_REALLOCMEM + * cdef readonly int ECAFE_BITSHUFF_BADCOUNT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_ALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_ALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":243 + * cdef readonly int ECAFE_BITSHUFF_DECOMPRESS + * cdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cdef readonly int ECAFE_BITSHUFF_REALLOCMEM # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BITSHUFF_BADCOUNT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_REALLOCMEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_REALLOCMEM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":244 + * cdef readonly int ECAFE_BITSHUFF_ALLOCMEM + * cdef readonly int ECAFE_BITSHUFF_REALLOCMEM + * cdef readonly int ECAFE_BITSHUFF_BADCOUNT # <<<<<<<<<<<<<< + * + * cdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BITSHUFF_BADCOUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BITSHUFF_BADCOUNT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":246 + * cdef readonly int ECAFE_BITSHUFF_BADCOUNT + * + * cdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_MULTIPART_MESS_NODATA); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_MULTIPART_MESS_NODATA.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":247 + * + * cdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * cdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_PARSEFAIL_MAINHEADER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_PARSEFAIL_MAINHEADER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":248 + * cdef readonly int ECAFE_BSREAD_MULTIPART_MESS_NODATA + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER # <<<<<<<<<<<<<< + * cdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_PARSEFAIL_DATAHEADER); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_PARSEFAIL_DATAHEADER.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":249 + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_MAINHEADER + * cdef readonly int ECAFE_BSREAD_PARSEFAIL_DATAHEADER + * cdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL # <<<<<<<<<<<<<< + * + * cdef readonly int ERRNO_EINTR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ECAFE_BSREAD_ZMQSTREAM_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ECAFE_BSREAD_ZMQSTREAM_NULL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":251 + * cdef readonly int ECAFE_BSREAD_ZMQSTREAM_NULL + * + * cdef readonly int ERRNO_EINTR # <<<<<<<<<<<<<< + * cdef readonly int ERRNO_EAGAIN + * cdef readonly int ERRNO_EFAULT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11ERRNO_EINTR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EINTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EINTR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":252 + * + * cdef readonly int ERRNO_EINTR + * cdef readonly int ERRNO_EAGAIN # <<<<<<<<<<<<<< + * cdef readonly int ERRNO_EFAULT + * cdef readonly int ERRNO_EINVAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EAGAIN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EAGAIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EAGAIN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":253 + * cdef readonly int ERRNO_EINTR + * cdef readonly int ERRNO_EAGAIN + * cdef readonly int ERRNO_EFAULT # <<<<<<<<<<<<<< + * cdef readonly int ERRNO_EINVAL + * cdef readonly int ERRNO_ENOTSOCK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EFAULT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":254 + * cdef readonly int ERRNO_EAGAIN + * cdef readonly int ERRNO_EFAULT + * cdef readonly int ERRNO_EINVAL # <<<<<<<<<<<<<< + * cdef readonly int ERRNO_ENOTSOCK + * cdef readonly int ERRNO_EPROTONOSUPPORT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12ERRNO_EINVAL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EINVAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EINVAL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":255 + * cdef readonly int ERRNO_EFAULT + * cdef readonly int ERRNO_EINVAL + * cdef readonly int ERRNO_ENOTSOCK # <<<<<<<<<<<<<< + * cdef readonly int ERRNO_EPROTONOSUPPORT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14ERRNO_ENOTSOCK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_ENOTSOCK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_ENOTSOCK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":256 + * cdef readonly int ERRNO_EINVAL + * cdef readonly int ERRNO_ENOTSOCK + * cdef readonly int ERRNO_EPROTONOSUPPORT # <<<<<<<<<<<<<< + * + * cdef readonly int SEV_NO_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ERRNO_EPROTONOSUPPORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.ERRNO_EPROTONOSUPPORT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":258 + * cdef readonly int ERRNO_EPROTONOSUPPORT + * + * cdef readonly int SEV_NO_ALARM # <<<<<<<<<<<<<< + * cdef readonly int SEV_MINOR + * cdef readonly int SEV_MAJOR + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12SEV_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_NO_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_NO_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":259 + * + * cdef readonly int SEV_NO_ALARM + * cdef readonly int SEV_MINOR # <<<<<<<<<<<<<< + * cdef readonly int SEV_MAJOR + * cdef readonly int SEV_INVALID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MINOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_MINOR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":260 + * cdef readonly int SEV_NO_ALARM + * cdef readonly int SEV_MINOR + * cdef readonly int SEV_MAJOR # <<<<<<<<<<<<<< + * cdef readonly int SEV_INVALID + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9SEV_MAJOR___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_MAJOR.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":261 + * cdef readonly int SEV_MINOR + * cdef readonly int SEV_MAJOR + * cdef readonly int SEV_INVALID # <<<<<<<<<<<<<< + * + * cdef readonly int STAT_NO_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11SEV_INVALID___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->SEV_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.SEV_INVALID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":263 + * cdef readonly int SEV_INVALID + * + * cdef readonly int STAT_NO_ALARM # <<<<<<<<<<<<<< + * cdef readonly int STAT_READ + * cdef readonly int STAT_WRITE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13STAT_NO_ALARM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_NO_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_NO_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":264 + * + * cdef readonly int STAT_NO_ALARM + * cdef readonly int STAT_READ # <<<<<<<<<<<<<< + * cdef readonly int STAT_WRITE + * cdef readonly int STAT_HIHI + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_READ___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_READ); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_READ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":265 + * cdef readonly int STAT_NO_ALARM + * cdef readonly int STAT_READ + * cdef readonly int STAT_WRITE # <<<<<<<<<<<<<< + * cdef readonly int STAT_HIHI + * cdef readonly int STAT_HIGH + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_WRITE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_WRITE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_WRITE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":266 + * cdef readonly int STAT_READ + * cdef readonly int STAT_WRITE + * cdef readonly int STAT_HIHI # <<<<<<<<<<<<<< + * cdef readonly int STAT_HIGH + * cdef readonly int STAT_LOLO + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIHI___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HIHI); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HIHI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":267 + * cdef readonly int STAT_WRITE + * cdef readonly int STAT_HIHI + * cdef readonly int STAT_HIGH # <<<<<<<<<<<<<< + * cdef readonly int STAT_LOLO + * cdef readonly int STAT_LOW + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_HIGH___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HIGH); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HIGH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":268 + * cdef readonly int STAT_HIHI + * cdef readonly int STAT_HIGH + * cdef readonly int STAT_LOLO # <<<<<<<<<<<<<< + * cdef readonly int STAT_LOW + * cdef readonly int STAT_STATE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LOLO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LOLO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LOLO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":269 + * cdef readonly int STAT_HIGH + * cdef readonly int STAT_LOLO + * cdef readonly int STAT_LOW # <<<<<<<<<<<<<< + * cdef readonly int STAT_STATE + * cdef readonly int STAT_COS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_LOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":270 + * cdef readonly int STAT_LOLO + * cdef readonly int STAT_LOW + * cdef readonly int STAT_STATE # <<<<<<<<<<<<<< + * cdef readonly int STAT_COS + * cdef readonly int STAT_COMM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10STAT_STATE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_STATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_STATE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":271 + * cdef readonly int STAT_LOW + * cdef readonly int STAT_STATE + * cdef readonly int STAT_COS # <<<<<<<<<<<<<< + * cdef readonly int STAT_COMM + * cdef readonly int STAT_TIMEOUT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_COS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_COS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_COS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":272 + * cdef readonly int STAT_STATE + * cdef readonly int STAT_COS + * cdef readonly int STAT_COMM # <<<<<<<<<<<<<< + * cdef readonly int STAT_TIMEOUT + * cdef readonly int STAT_HWLIMIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_COMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_COMM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_COMM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":273 + * cdef readonly int STAT_COS + * cdef readonly int STAT_COMM + * cdef readonly int STAT_TIMEOUT # <<<<<<<<<<<<<< + * cdef readonly int STAT_HWLIMIT + * cdef readonly int STAT_CALC + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_TIMEOUT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_TIMEOUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":274 + * cdef readonly int STAT_COMM + * cdef readonly int STAT_TIMEOUT + * cdef readonly int STAT_HWLIMIT # <<<<<<<<<<<<<< + * cdef readonly int STAT_CALC + * cdef readonly int STAT_SCAN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_HWLIMIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_HWLIMIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_HWLIMIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":275 + * cdef readonly int STAT_TIMEOUT + * cdef readonly int STAT_HWLIMIT + * cdef readonly int STAT_CALC # <<<<<<<<<<<<<< + * cdef readonly int STAT_SCAN + * cdef readonly int STAT_LINK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_CALC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_CALC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_CALC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":276 + * cdef readonly int STAT_HWLIMIT + * cdef readonly int STAT_CALC + * cdef readonly int STAT_SCAN # <<<<<<<<<<<<<< + * cdef readonly int STAT_LINK + * cdef readonly int STAT_SOFT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SCAN___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SCAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SCAN.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":277 + * cdef readonly int STAT_CALC + * cdef readonly int STAT_SCAN + * cdef readonly int STAT_LINK # <<<<<<<<<<<<<< + * cdef readonly int STAT_SOFT + * cdef readonly int STAT_BAD_SUB + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_LINK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_LINK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_LINK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":278 + * cdef readonly int STAT_SCAN + * cdef readonly int STAT_LINK + * cdef readonly int STAT_SOFT # <<<<<<<<<<<<<< + * cdef readonly int STAT_BAD_SUB + * cdef readonly int STAT_UDF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SOFT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SOFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SOFT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":279 + * cdef readonly int STAT_LINK + * cdef readonly int STAT_SOFT + * cdef readonly int STAT_BAD_SUB # <<<<<<<<<<<<<< + * cdef readonly int STAT_UDF + * cdef readonly int STAT_DISABLE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_BAD_SUB___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_BAD_SUB); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_BAD_SUB.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":280 + * cdef readonly int STAT_SOFT + * cdef readonly int STAT_BAD_SUB + * cdef readonly int STAT_UDF # <<<<<<<<<<<<<< + * cdef readonly int STAT_DISABLE + * cdef readonly int STAT_SIMM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8STAT_UDF___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_UDF); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_UDF.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":281 + * cdef readonly int STAT_BAD_SUB + * cdef readonly int STAT_UDF + * cdef readonly int STAT_DISABLE # <<<<<<<<<<<<<< + * cdef readonly int STAT_SIMM + * cdef readonly int STAT_READ_ACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12STAT_DISABLE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_DISABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_DISABLE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":282 + * cdef readonly int STAT_UDF + * cdef readonly int STAT_DISABLE + * cdef readonly int STAT_SIMM # <<<<<<<<<<<<<< + * cdef readonly int STAT_READ_ACCESS + * cdef readonly int STAT_WRITE_ACCESS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9STAT_SIMM___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_SIMM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_SIMM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":283 + * cdef readonly int STAT_DISABLE + * cdef readonly int STAT_SIMM + * cdef readonly int STAT_READ_ACCESS # <<<<<<<<<<<<<< + * cdef readonly int STAT_WRITE_ACCESS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16STAT_READ_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_READ_ACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_READ_ACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":284 + * cdef readonly int STAT_SIMM + * cdef readonly int STAT_READ_ACCESS + * cdef readonly int STAT_WRITE_ACCESS # <<<<<<<<<<<<<< + * + * # ctypedef enum ChannelRequestPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17STAT_WRITE_ACCESS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->STAT_WRITE_ACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.STAT_WRITE_ACCESS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":287 + * + * # ctypedef enum ChannelRequestPolicyKind: + * cdef readonly unsigned int WITHOUT_CALLBACK # <<<<<<<<<<<<<< + * cdef readonly unsigned int WITH_CALLBACK_DEFAULT + * cdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_16WITHOUT_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITHOUT_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITHOUT_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":288 + * # ctypedef enum ChannelRequestPolicyKind: + * cdef readonly unsigned int WITHOUT_CALLBACK + * cdef readonly unsigned int WITH_CALLBACK_DEFAULT # <<<<<<<<<<<<<< + * cdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_CALLBACK_DEFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_CALLBACK_DEFAULT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":289 + * cdef readonly unsigned int WITHOUT_CALLBACK + * cdef readonly unsigned int WITH_CALLBACK_DEFAULT + * cdef readonly unsigned int WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * # ChannelFlushSendBufferPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_CALLBACK_USER_SUPPLIED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_CALLBACK_USER_SUPPLIED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":292 + * + * # ChannelFlushSendBufferPolicyKind: + * cdef readonly unsigned int WITH_FLUSH_IO # <<<<<<<<<<<<<< + * cdef readonly unsigned int WITH_PEND_IO + * cdef readonly unsigned int WITH_PEND_EVENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13WITH_FLUSH_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_FLUSH_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_FLUSH_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":293 + * # ChannelFlushSendBufferPolicyKind: + * cdef readonly unsigned int WITH_FLUSH_IO + * cdef readonly unsigned int WITH_PEND_IO # <<<<<<<<<<<<<< + * cdef readonly unsigned int WITH_PEND_EVENT + * cdef readonly unsigned int WITH_POLL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12WITH_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_PEND_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_PEND_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":294 + * cdef readonly unsigned int WITH_FLUSH_IO + * cdef readonly unsigned int WITH_PEND_IO + * cdef readonly unsigned int WITH_PEND_EVENT # <<<<<<<<<<<<<< + * cdef readonly unsigned int WITH_POLL + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15WITH_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_PEND_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_PEND_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":295 + * cdef readonly unsigned int WITH_PEND_IO + * cdef readonly unsigned int WITH_PEND_EVENT + * cdef readonly unsigned int WITH_POLL # <<<<<<<<<<<<<< + * + * # ChannelWhenToFlushSendBufferPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9WITH_POLL___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WITH_POLL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WITH_POLL.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":298 + * + * # ChannelWhenToFlushSendBufferPolicyKind: + * cdef readonly unsigned int FLUSH_AUTOMATIC # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_NOW + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15FLUSH_AUTOMATIC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AUTOMATIC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AUTOMATIC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":299 + * # ChannelWhenToFlushSendBufferPolicyKind: + * cdef readonly unsigned int FLUSH_AUTOMATIC + * cdef readonly unsigned int FLUSH_NOW # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FLUSH_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_NOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_NOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":300 + * cdef readonly unsigned int FLUSH_AUTOMATIC + * cdef readonly unsigned int FLUSH_NOW + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_CREATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_CHANNEL_CREATION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":301 + * cdef readonly unsigned int FLUSH_NOW + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":302 + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_CREATION + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + * cdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":303 + * cdef readonly unsigned int FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION + * cdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION # <<<<<<<<<<<<<< + * cdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_AFTER_EACH_GROUP_CREATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_AFTER_EACH_GROUP_CREATION.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":304 + * cdef readonly unsigned int FLUSH_AFTER_EACH_MESSAGE + * cdef readonly unsigned int FLUSH_AFTER_EACH_GROUP_CREATION + * cdef readonly unsigned int FLUSH_DESIGNATED_TO_CLIENT # <<<<<<<<<<<<<< + * + * # ChannelGetCacheWaitPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FLUSH_DESIGNATED_TO_CLIENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FLUSH_DESIGNATED_TO_CLIENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":307 + * + * # ChannelGetCacheWaitPolicyKind: + * cdef readonly unsigned int GET_CACHE_NO_CHECK # <<<<<<<<<<<<<< + * cdef readonly unsigned int GET_CACHE_NO_WAIT + * cdef readonly unsigned int GET_CACHE_NOW + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NO_CHECK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NO_CHECK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":308 + * # ChannelGetCacheWaitPolicyKind: + * cdef readonly unsigned int GET_CACHE_NO_CHECK + * cdef readonly unsigned int GET_CACHE_NO_WAIT # <<<<<<<<<<<<<< + * cdef readonly unsigned int GET_CACHE_NOW + * cdef readonly unsigned int GET_CACHE_WAIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NO_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NO_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":309 + * cdef readonly unsigned int GET_CACHE_NO_CHECK + * cdef readonly unsigned int GET_CACHE_NO_WAIT + * cdef readonly unsigned int GET_CACHE_NOW # <<<<<<<<<<<<<< + * cdef readonly unsigned int GET_CACHE_WAIT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13GET_CACHE_NOW___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_NOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_NOW.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":310 + * cdef readonly unsigned int GET_CACHE_NO_WAIT + * cdef readonly unsigned int GET_CACHE_NOW + * cdef readonly unsigned int GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * # ChannelGetActionWhenMonitorPolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_CACHE_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_CACHE_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_CACHE_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":313 + * + * # ChannelGetActionWhenMonitorPolicyKind: + * cdef readonly unsigned int GET_FROM_CACHE # <<<<<<<<<<<<<< + * cdef readonly unsigned int GET_FROM_IOC + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_14GET_FROM_CACHE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_FROM_CACHE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_FROM_CACHE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":314 + * # ChannelGetActionWhenMonitorPolicyKind: + * cdef readonly unsigned int GET_FROM_CACHE + * cdef readonly unsigned int GET_FROM_IOC # <<<<<<<<<<<<<< + * + * # ChannelRequestDataTypePolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12GET_FROM_IOC___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->GET_FROM_IOC); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.GET_FROM_IOC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":317 + * + * # ChannelRequestDataTypePolicyKind: + * cdef readonly unsigned int NATIVE_DATATYPE # <<<<<<<<<<<<<< + * # The smaller in byte size of type requested and native datatype + * cdef readonly unsigned int LOWEST_DATATYPE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15NATIVE_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NATIVE_DATATYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NATIVE_DATATYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":319 + * cdef readonly unsigned int NATIVE_DATATYPE + * # The smaller in byte size of type requested and native datatype + * cdef readonly unsigned int LOWEST_DATATYPE # <<<<<<<<<<<<<< + * + * # ChannelWaitForResponsePolicyKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_15LOWEST_DATATYPE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->LOWEST_DATATYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.LOWEST_DATATYPE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":322 + * + * # ChannelWaitForResponsePolicyKind: + * cdef readonly unsigned int BLOCKING # <<<<<<<<<<<<<< + * cdef readonly unsigned int WAIT + * cdef readonly unsigned int NON_BLOCKING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->BLOCKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BLOCKING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":323 + * # ChannelWaitForResponsePolicyKind: + * cdef readonly unsigned int BLOCKING + * cdef readonly unsigned int WAIT # <<<<<<<<<<<<<< + * cdef readonly unsigned int NON_BLOCKING + * cdef readonly unsigned int NO_WAIT + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_4WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_4WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":324 + * cdef readonly unsigned int BLOCKING + * cdef readonly unsigned int WAIT + * cdef readonly unsigned int NON_BLOCKING # <<<<<<<<<<<<<< + * cdef readonly unsigned int NO_WAIT + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12NON_BLOCKING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NON_BLOCKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NON_BLOCKING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":325 + * cdef readonly unsigned int WAIT + * cdef readonly unsigned int NON_BLOCKING + * cdef readonly unsigned int NO_WAIT # <<<<<<<<<<<<<< + * + * # StatusMessageKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_7NO_WAIT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NO_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NO_WAIT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":328 + * + * # StatusMessageKind: + * cdef readonly unsigned int NO_MESSAGE # <<<<<<<<<<<<<< + * cdef readonly unsigned int PRE_REQUEST + * cdef readonly unsigned int FROM_REQUEST + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_10NO_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NO_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NO_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":329 + * # StatusMessageKind: + * cdef readonly unsigned int NO_MESSAGE + * cdef readonly unsigned int PRE_REQUEST # <<<<<<<<<<<<<< + * cdef readonly unsigned int FROM_REQUEST + * cdef readonly unsigned int FROM_PEND + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_11PRE_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->PRE_REQUEST); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.PRE_REQUEST.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":330 + * cdef readonly unsigned int NO_MESSAGE + * cdef readonly unsigned int PRE_REQUEST + * cdef readonly unsigned int FROM_REQUEST # <<<<<<<<<<<<<< + * cdef readonly unsigned int FROM_PEND + * cdef readonly unsigned int FROM_CALLBACK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_REQUEST___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_REQUEST); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_REQUEST.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":331 + * cdef readonly unsigned int PRE_REQUEST + * cdef readonly unsigned int FROM_REQUEST + * cdef readonly unsigned int FROM_PEND # <<<<<<<<<<<<<< + * cdef readonly unsigned int FROM_CALLBACK + * cdef readonly unsigned int FROM_MESSAGE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_9FROM_PEND___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_PEND); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_PEND.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":332 + * cdef readonly unsigned int FROM_REQUEST + * cdef readonly unsigned int FROM_PEND + * cdef readonly unsigned int FROM_CALLBACK # <<<<<<<<<<<<<< + * cdef readonly unsigned int FROM_MESSAGE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13FROM_CALLBACK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_CALLBACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_CALLBACK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":333 + * cdef readonly unsigned int FROM_PEND + * cdef readonly unsigned int FROM_CALLBACK + * cdef readonly unsigned int FROM_MESSAGE # <<<<<<<<<<<<<< + * + * # CallbackProgressKind: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_12FROM_MESSAGE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->FROM_MESSAGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.FROM_MESSAGE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":336 + * + * # CallbackProgressKind: + * cdef readonly unsigned int NOT_INITIATED # <<<<<<<<<<<<<< + * cdef readonly unsigned int PENDING + * cdef readonly unsigned int COMPLETE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_13NOT_INITIATED___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->NOT_INITIATED); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.NOT_INITIATED.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":337 + * # CallbackProgressKind: + * cdef readonly unsigned int NOT_INITIATED + * cdef readonly unsigned int PENDING # <<<<<<<<<<<<<< + * cdef readonly unsigned int COMPLETE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_7PENDING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_7PENDING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->PENDING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.PENDING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":338 + * cdef readonly unsigned int NOT_INITIATED + * cdef readonly unsigned int PENDING + * cdef readonly unsigned int COMPLETE # <<<<<<<<<<<<<< + * + * # deines.h: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_8COMPLETE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->COMPLETE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.COMPLETE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":341 + * + * # deines.h: + * cdef readonly double DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * cdef readonly double DEFAULT_TIMEOUT_PEND_IO + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->DEFAULT_TIMEOUT_PEND_EVENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.DEFAULT_TIMEOUT_PEND_EVENT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":342 + * # deines.h: + * cdef readonly double DEFAULT_TIMEOUT_PEND_EVENT + * cdef readonly double DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * + * cdef readonly string INVALID_ENUM_RETURN_STRING + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->DEFAULT_TIMEOUT_PEND_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.DEFAULT_TIMEOUT_PEND_IO.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":344 + * cdef readonly double DEFAULT_TIMEOUT_PEND_IO + * + * cdef readonly string INVALID_ENUM_RETURN_STRING # <<<<<<<<<<<<<< + * cdef readonly short INVALID_ENUM_RETURN_VALUE + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->INVALID_ENUM_RETURN_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.INVALID_ENUM_RETURN_STRING.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":345 + * + * cdef readonly string INVALID_ENUM_RETURN_STRING + * cdef readonly short INVALID_ENUM_RETURN_VALUE # <<<<<<<<<<<<<< + * + * cdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->INVALID_ENUM_RETURN_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.INVALID_ENUM_RETURN_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":347 + * cdef readonly short INVALID_ENUM_RETURN_VALUE + * + * cdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK # <<<<<<<<<<<<<< + * cdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->BSREAD_ZEROMQ_HIGH_WATER_MARK); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BSREAD_ZEROMQ_HIGH_WATER_MARK.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":348 + * + * cdef readonly unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK + * cdef readonly short BSREAD_ZEROMQ_TIMEOUT_MS # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS___get__(struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->BSREAD_ZEROMQ_TIMEOUT_MS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.BSREAD_ZEROMQ_TIMEOUT_MS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(((struct __pyx_obj_6PyCafe_CyCa *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_4CyCa_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCa *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCa.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":681 + * cdef CAOPCodes caop + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.channelID = 0 + * self.connectFlag = False + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_11channelInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_11channelInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_11channelInfo___cinit__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_11channelInfo___cinit__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":682 + * + * def __cinit__(self): + * self.channelID = 0 # <<<<<<<<<<<<<< + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->channelID = 0; + + /* "PyCafeDefs.pxi":683 + * def __cinit__(self): + * self.channelID = 0 + * self.connectFlag = False # <<<<<<<<<<<<<< + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 + */ + __pyx_v_self->connectFlag = 0; + + /* "PyCafeDefs.pxi":684 + * self.channelID = 0 + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__5, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->hostName = __pyx_t_4; + + /* "PyCafeDefs.pxi":685 + * self.connectFlag = False + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 # <<<<<<<<<<<<<< + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + */ + __pyx_v_self->nelem = 0; + + /* "PyCafeDefs.pxi":686 + * self.hostName = (< bytes > ("")).encode('UTF-8') + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 + */ + __pyx_v_self->dataType = ICAFE_TYPENOTCONN; + + /* "PyCafeDefs.pxi":687 + * self.nelem = 0 + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.accessRead = 0 + * self.accessWrite = 0 + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_TYPENOTCONN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->dataTypeAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":688 + * self.dataType = ICAFE_TYPENOTCONN + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 # <<<<<<<<<<<<<< + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->accessRead = 0; + + /* "PyCafeDefs.pxi":689 + * self.dataTypeAsString = (< bytes > ("ICAFE_TYPENOTCONN")).encode('UTF-8') + * self.accessRead = 0 + * self.accessWrite = 0 # <<<<<<<<<<<<<< + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + */ + __pyx_v_self->accessWrite = 0; + + /* "PyCafeDefs.pxi":690 + * self.accessRead = 0 + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__5, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->className = __pyx_t_4; + + /* "PyCafeDefs.pxi":691 + * self.accessWrite = 0 + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN # <<<<<<<<<<<<<< + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + */ + __pyx_v_self->connectionState = ICAFE_CA_OP_CONN_DOWN; + + /* "PyCafeDefs.pxi":692 + * self.className = (< bytes > ("")).encode('UTF-8') + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN # <<<<<<<<<<<<<< + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + */ + __pyx_v_self->cafeConnectionState = ICAFE_CS_NEVER_CONN; + + /* "PyCafeDefs.pxi":693 + * self.connectionState = ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') # <<<<<<<<<<<<<< + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CA_OP_CONN_DOWN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->connectionStateAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":694 + * self.cafeConnectionState = ICAFE_CS_NEVER_CONN + * self.connectionStateAsString = (< bytes > ('ICAFE_CA_OP_CONN_DOWN')).encode('UTF-8') + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CS_NEVER_CONN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_UTF_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 694, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->cafeConnectionStateAsString = __pyx_t_4; + + /* "PyCafeDefs.pxi":681 + * cdef CAOPCodes caop + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.channelID = 0 + * self.connectFlag = False + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.channelInfo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":696 + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_2show(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_2show(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_UCS4 __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":697 + * + * def show(self): + * print("channelID = %s" % hex(self.channelID)) # <<<<<<<<<<<<<< + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) + */ + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->channelID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_channelID_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":698 + * def show(self): + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) # <<<<<<<<<<<<<< + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->connectFlag); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_connectFlag_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":699 + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) # <<<<<<<<<<<<<< + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % + */ + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hostName); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_hostName_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":700 + * print("connectFlag = %d" % self.connectFlag) + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) # <<<<<<<<<<<<<< + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_nelem_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":701 + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % # <<<<<<<<<<<<<< + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_dataType); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_dataType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_dataType); + + /* "PyCafeDefs.pxi":702 + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) # <<<<<<<<<<<<<< + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cdt.message(__pyx_v_self->dataType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__6); + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->dataType, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":701 + * print("hostName = %s" % self.hostName) + * print("nelem = %d" % self.nelem) + * print("dataType = %s (%d)" % # <<<<<<<<<<<<<< + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":703 + * print("dataType = %s (%d)" % + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) # <<<<<<<<<<<<<< + * print("accessWrite = %d" % self.accessWrite) + * print("className = %s" % self.className) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_accessRead_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":704 + * (self.cdt.message(self.dataType), self.dataType)) + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) # <<<<<<<<<<<<<< + * print("className = %s" % self.className) + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessWrite); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_accessWrite_d, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":705 + * print("accessRead = %d" % self.accessRead) + * print("accessWrite = %d" % self.accessWrite) + * print("className = %s" % self.className) # <<<<<<<<<<<<<< + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + */ + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->className); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_className_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":708 + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % # <<<<<<<<<<<<<< + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_connectionState); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_connectionState); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_connectionState); + + /* "PyCafeDefs.pxi":709 + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) # <<<<<<<<<<<<<< + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->caop.message(__pyx_v_self->connectionState)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__6); + __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->connectionState, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); + __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":708 + * #print ("connectionState = %s (%d)" % (self.connectionStateAsString, self.connectionState)) + * #print ("cafeConnectionState = %s (%d)" % (self.cafeConnectionStateAsString,self.cafeConnectionState)) + * print("connectionState = %s (%d)" % # <<<<<<<<<<<<<< + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + */ + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":710 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = 127; + __Pyx_INCREF(__pyx_kp_u_cafeConnectionState); + __pyx_t_3 += 22; + __Pyx_GIVEREF(__pyx_kp_u_cafeConnectionState); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_cafeConnectionState); + + /* "PyCafeDefs.pxi":711 + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->csc.message(__pyx_v_self->cafeConnectionState)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":710 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_3 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__6); + + /* "PyCafeDefs.pxi":711 + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->cafeConnectionState, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_3 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":710 + * print("connectionState = %s (%d)" % + * (self.caop.message(self.connectionState), self.connectionState)) + * print("cafeConnectionState = %s (%d)" % (self.csc.message( # <<<<<<<<<<<<<< + * self.cafeConnectionState), self.cafeConnectionState)) + * return + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":712 + * print("cafeConnectionState = %s (%d)" % (self.csc.message( + * self.cafeConnectionState), self.cafeConnectionState)) + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":696 + * self.cafeConnectionStateAsString = (< bytes > ('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print("channelID = %s" % hex(self.channelID)) + * print("connectFlag = %d" % self.connectFlag) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.channelInfo.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":663 + * + * cdef class channelInfo: + * cdef readonly long channelID # <<<<<<<<<<<<<< + * cdef readonly bint connectFlag + * cdef readonly string hostName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_9channelID___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9channelID___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->channelID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.channelID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":664 + * cdef class channelInfo: + * cdef readonly long channelID + * cdef readonly bint connectFlag # <<<<<<<<<<<<<< + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11connectFlag___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->connectFlag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectFlag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":665 + * cdef readonly long channelID + * cdef readonly bint connectFlag + * cdef readonly string hostName # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_8hostName___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8hostName___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hostName); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.hostName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":666 + * cdef readonly bint connectFlag + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native # <<<<<<<<<<<<<< + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_5nelem___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_5nelem___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":667 + * cdef readonly string hostName + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native # <<<<<<<<<<<<<< + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_8dataType___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_8dataType___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":668 + * cdef readonly unsigned int nelem # native + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native # <<<<<<<<<<<<<< + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->dataTypeAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.dataTypeAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":669 + * cdef readonly int dataType # native + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 # <<<<<<<<<<<<<< + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_10accessRead___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessRead); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.accessRead.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":670 + * cdef readonly string dataTypeAsString # native + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 # <<<<<<<<<<<<<< + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_11accessWrite___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessWrite); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.accessWrite.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":671 + * cdef readonly unsigned short accessRead # 0 or 1 + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t # <<<<<<<<<<<<<< + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9className_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_9className_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_9className___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_9className___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->className); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.className.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":672 + * cdef readonly unsigned short accessWrite # 0 or 1 + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ # <<<<<<<<<<<<<< + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + * cdef readonly string connectionStateAsString # as given by CA_OP_ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_15connectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->connectionState); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectionState.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":673 + * cdef readonly string className # dbr_class_name_t + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state # <<<<<<<<<<<<<< + * cdef readonly string connectionStateAsString # as given by CA_OP_ + * # as given by cafe_cs_state + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_19cafeConnectionState___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->cafeConnectionState); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.cafeConnectionState.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":674 + * cdef readonly int connectionState # as given by CA_OP_ + * cdef readonly int cafeConnectionState # as given by cafe_cs_state + * cdef readonly string connectionStateAsString # as given by CA_OP_ # <<<<<<<<<<<<<< + * # as given by cafe_cs_state + * cdef readonly string cafeConnectionStateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_23connectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->connectionStateAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.connectionStateAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":676 + * cdef readonly string connectionStateAsString # as given by CA_OP_ + * # as given by cafe_cs_state + * cdef readonly string cafeConnectionStateAsString # <<<<<<<<<<<<<< + * cdef CAFEDataTypeCode cdt + * cdef CAFEStatusCode csc + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_27cafeConnectionStateAsString___get__(struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cafeConnectionStateAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.cafeConnectionStateAsString.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_11channelInfo_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":771 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvctrl_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6pvctrl_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6pvctrl___cinit__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvctrl___cinit__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":772 + * + * def __cinit__(self): + * self.nelem = 1 # <<<<<<<<<<<<<< + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":773 + * def __cinit__(self): + * self.nelem = 1 + * self.alarmStatus = -1 # <<<<<<<<<<<<<< + * self.alarmSeverity = -1 + * self.precision = 0 + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":774 + * self.nelem = 1 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 # <<<<<<<<<<<<<< + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":775 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + * self.precision = 0 # <<<<<<<<<<<<<< + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 + */ + __pyx_v_self->precision = 0; + + /* "PyCafeDefs.pxi":776 + * self.alarmSeverity = -1 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings = 0 + * self.enumStrings = [] + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->units); + __Pyx_DECREF(__pyx_v_self->units); + __pyx_v_self->units = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":777 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 # <<<<<<<<<<<<<< + * self.enumStrings = [] + * self.upperDisplayLimit = 0 + */ + __pyx_v_self->noEnumStrings = 0; + + /* "PyCafeDefs.pxi":778 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') + * self.noEnumStrings = 0 + * self.enumStrings = [] # <<<<<<<<<<<<<< + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->enumStrings); + __Pyx_DECREF(__pyx_v_self->enumStrings); + __pyx_v_self->enumStrings = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":779 + * self.noEnumStrings = 0 + * self.enumStrings = [] + * self.upperDisplayLimit = 0 # <<<<<<<<<<<<<< + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperDisplayLimit); + __Pyx_DECREF(__pyx_v_self->upperDisplayLimit); + __pyx_v_self->upperDisplayLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":780 + * self.enumStrings = [] + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 # <<<<<<<<<<<<<< + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerDisplayLimit); + __Pyx_DECREF(__pyx_v_self->lowerDisplayLimit); + __pyx_v_self->lowerDisplayLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":781 + * self.upperDisplayLimit = 0 + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 # <<<<<<<<<<<<<< + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperAlarmLimit); + __Pyx_DECREF(__pyx_v_self->upperAlarmLimit); + __pyx_v_self->upperAlarmLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":782 + * self.lowerDisplayLimit = 0 + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 # <<<<<<<<<<<<<< + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerAlarmLimit); + __Pyx_DECREF(__pyx_v_self->lowerAlarmLimit); + __pyx_v_self->lowerAlarmLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":783 + * self.upperAlarmLimit = 0 + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 # <<<<<<<<<<<<<< + * self.lowerControlLimit = 0 + * self.value = [] + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->upperControlLimit); + __Pyx_DECREF(__pyx_v_self->upperControlLimit); + __pyx_v_self->upperControlLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":784 + * self.lowerAlarmLimit = 0 + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 # <<<<<<<<<<<<<< + * self.value = [] + * self.status = 1 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GOTREF(__pyx_v_self->lowerControlLimit); + __Pyx_DECREF(__pyx_v_self->lowerControlLimit); + __pyx_v_self->lowerControlLimit = __pyx_int_0; + + /* "PyCafeDefs.pxi":785 + * self.upperControlLimit = 0 + * self.lowerControlLimit = 0 + * self.value = [] # <<<<<<<<<<<<<< + * self.status = 1 + * + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":786 + * self.lowerControlLimit = 0 + * self.value = [] + * self.status = 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":771 + * cdef readonly int status + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":789 + * + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_2show(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_2show(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":790 + * + * def show(self): + * self.showPrint(self.nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvctrl *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":791 + * def show(self): + * self.showPrint(self.nelem) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":789 + * + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvctrl.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":793 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_4showMax(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self), ((PyObject *)__pyx_v_nelem)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_4showMax(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":794 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_nelem, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 794, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 794, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":798 + * # print ("Note: Max. Nelem =", self.nelem + * # print ("----------------------" + * nelem = self.nelem # <<<<<<<<<<<<<< + * self.showPrint(nelem) + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":794 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":799 + * # print ("----------------------" + * nelem = self.nelem + * self.showPrint(nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvctrl *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v_nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":800 + * nelem = self.nelem + * self.showPrint(nelem) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":793 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvctrl.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_nelem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":802 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + +static PyObject *__pyx_f_6PyCafe_6pvctrl_showPrint(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, PyObject *__pyx_v_nelem) { + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + long __pyx_t_6; + long __pyx_t_7; + unsigned int __pyx_t_8; + unsigned short __pyx_t_9; + unsigned short __pyx_t_10; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":805 + * cdef unsigned int i + * # is self.value[0] a list + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":806 + * # is self.value[0] a list + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = ", self.value[0][0], end="") + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 806, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":807 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") # <<<<<<<<<<<<<< + * else: + * print("value =", self.value[0], end="" ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 807, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 807, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":806 + * # is self.value[0] a list + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = ", self.value[0][0], end="") + * else: + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":809 + * print("value = ", self.value[0][0], end="") + * else: + * print("value =", self.value[0], end="" ) # <<<<<<<<<<<<<< + * else: + * print("value = ", end="") + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 809, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_kp_u_value_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":805 + * cdef unsigned int i + * # is self.value[0] a list + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = ", self.value[0][0], end="") + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":811 + * print("value =", self.value[0], end="" ) + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 811, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__11, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":813 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 813, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyList_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":814 + * + * if isinstance(self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + */ + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 814, __pyx_L1_error) + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":815 + * if isinstance(self.value[0], list): + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * else: + * for i in range(0, nelem): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 815, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 815, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":813 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":817 + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[i], "[%d]" % i, end=" ") + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 817, __pyx_L1_error) + __pyx_t_7 = __pyx_t_6; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":818 + * else: + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * + * print("") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 818, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_1 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 818, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + __pyx_L5:; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":820 + * print(self.value[i], "[%d]" % i, end=" ") + * + * print("") # <<<<<<<<<<<<<< + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 820, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":821 + * + * print("") + * print("status = %d" % self.status) # <<<<<<<<<<<<<< + * print("alarmStatus = %d" % self.alarmStatus) + * print("alarmSeverity = %d" % self.alarmSeverity) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_status_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":822 + * print("") + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d" % self.alarmSeverity) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_alarmStatus_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":823 + * print("status = %d" % self.status) + * print("alarmStatus = %d" % self.alarmStatus) + * print("alarmSeverity = %d" % self.alarmSeverity) # <<<<<<<<<<<<<< + * + * if self.noEnumStrings > 0: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_alarmSeverity_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":825 + * print("alarmSeverity = %d" % self.alarmSeverity) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + */ + __pyx_t_2 = ((__pyx_v_self->noEnumStrings > 0) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":826 + * + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) # <<<<<<<<<<<<<< + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->noEnumStrings); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_noEnumStrings_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":827 + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 827, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":828 + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): # <<<<<<<<<<<<<< + * print(self.enumStrings[i], "[%s]" % i, end=" ") + * print("") + */ + __pyx_t_9 = __pyx_v_self->noEnumStrings; + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_10; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafeDefs.pxi":829 + * print("enumStrings =", end=" ") # end for same line + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") # <<<<<<<<<<<<<< + * print("") + * else: + */ + if (unlikely(__pyx_v_self->enumStrings == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 829, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->enumStrings, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 829, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafeDefs.pxi":830 + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + * print("") # <<<<<<<<<<<<<< + * else: + * print("precision = %d" % self.precision) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":825 + * print("alarmSeverity = %d" % self.alarmSeverity) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line + */ + goto __pyx_L10; + } + + /* "PyCafeDefs.pxi":832 + * print("") + * else: + * print("precision = %d" % self.precision) # <<<<<<<<<<<<<< + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->precision); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_precision_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":833 + * else: + * print("precision = %d" % self.precision) + * print("units = %s" % self.units) # <<<<<<<<<<<<<< + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_units_s, __pyx_v_self->units); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":834 + * print("precision = %d" % self.precision) + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) # <<<<<<<<<<<<<< + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperDisplayLimit_f, __pyx_v_self->upperDisplayLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":835 + * print("units = %s" % self.units) + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) # <<<<<<<<<<<<<< + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerDisplayLimit_f, __pyx_v_self->lowerDisplayLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":836 + * print("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) # <<<<<<<<<<<<<< + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperAlarmLimit_f, __pyx_v_self->upperAlarmLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":837 + * print("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) # <<<<<<<<<<<<<< + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerAlarmLimit_f, __pyx_v_self->lowerAlarmLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":838 + * print("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) # <<<<<<<<<<<<<< + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperWarningLimit_f, __pyx_v_self->upperWarningLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":839 + * print("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) # <<<<<<<<<<<<<< + * print("upperControlLimit = %f" % self.upperControlLimit) + * print("lowerControlLimit = %f" % self.lowerControlLimit) + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerWarningLimit_f, __pyx_v_self->lowerWarningLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":840 + * print("upperWarningLimit = %f" % self.upperWarningLimit) + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) # <<<<<<<<<<<<<< + * print("lowerControlLimit = %f" % self.lowerControlLimit) + * + */ + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_upperControlLimit_f, __pyx_v_self->upperControlLimit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":841 + * print("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print("upperControlLimit = %f" % self.upperControlLimit) + * print("lowerControlLimit = %f" % self.lowerControlLimit) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_lowerControlLimit_f, __pyx_v_self->lowerControlLimit); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L10:; + + /* "PyCafeDefs.pxi":802 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.pvctrl.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":753 + * ################################################################################## + * cdef class pvctrl: + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5nelem___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5nelem___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":754 + * cdef class pvctrl: + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus # <<<<<<<<<<<<<< + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.alarmStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":755 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly unsigned short precision + * cdef readonly str units + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.alarmSeverity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":756 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision # <<<<<<<<<<<<<< + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_9precision___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_9precision___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->precision); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.precision.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":757 + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision + * cdef readonly str units # <<<<<<<<<<<<<< + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5units_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5units_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5units___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5units___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->units); + __pyx_r = __pyx_v_self->units; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":758 + * cdef readonly unsigned short precision + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings # <<<<<<<<<<<<<< + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13noEnumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->noEnumStrings); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.noEnumStrings.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":759 + * cdef readonly str units + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings # <<<<<<<<<<<<<< + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_11enumStrings___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->enumStrings); + __pyx_r = __pyx_v_self->enumStrings; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":760 + * cdef readonly unsigned short noEnumStrings + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit # <<<<<<<<<<<<<< + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperDisplayLimit); + __pyx_r = __pyx_v_self->upperDisplayLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":761 + * cdef readonly list enumStrings + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit # <<<<<<<<<<<<<< + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerDisplayLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerDisplayLimit); + __pyx_r = __pyx_v_self->lowerDisplayLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":762 + * cdef readonly upperDisplayLimit + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit # <<<<<<<<<<<<<< + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15upperAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperAlarmLimit); + __pyx_r = __pyx_v_self->upperAlarmLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":763 + * cdef readonly lowerDisplayLimit + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit # <<<<<<<<<<<<<< + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperWarningLimit); + __pyx_r = __pyx_v_self->upperWarningLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":764 + * cdef readonly upperAlarmLimit + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit # <<<<<<<<<<<<<< + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerWarningLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerWarningLimit); + __pyx_r = __pyx_v_self->lowerWarningLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":765 + * cdef readonly upperWarningLimit + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit # <<<<<<<<<<<<<< + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_15lowerAlarmLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerAlarmLimit); + __pyx_r = __pyx_v_self->lowerAlarmLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":766 + * cdef readonly lowerWarningLimit + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit # <<<<<<<<<<<<<< + * cdef readonly lowerControlLimit + * cdef readonly list value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17upperControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->upperControlLimit); + __pyx_r = __pyx_v_self->upperControlLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":767 + * cdef readonly lowerAlarmLimit + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit # <<<<<<<<<<<<<< + * cdef readonly list value + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_17lowerControlLimit___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->lowerControlLimit); + __pyx_r = __pyx_v_self->lowerControlLimit; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":768 + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef readonly int status + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_5value_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_5value___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_5value___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":769 + * cdef readonly lowerControlLimit + * cdef readonly list value + * cdef readonly int status # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_6status___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6status___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvctrl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":856 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_13CafeException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_13CafeException_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v__type = 0; + PyObject *__pyx_v__source = 0; + PyObject *__pyx_v__handle = 0; + PyObject *__pyx_v__pv_name = 0; + PyObject *__pyx_v__error_code = 0; + PyObject *__pyx_v__error_text = 0; + PyObject *__pyx_v__error_info = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_source,&__pyx_n_s_handle,&__pyx_n_s_pv_name,&__pyx_n_s_error_code,&__pyx_n_s_error_text,&__pyx_n_s_error_info,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + values[0] = ((PyObject *)__pyx_n_u_CafePVError); + + /* "PyCafeDefs.pxi":857 + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( + * self, _type="CafePVError", _source=None, _handle=0, # <<<<<<<<<<<<<< + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type + */ + values[1] = ((PyObject *)Py_None); + values[2] = ((PyObject *)__pyx_int_0); + + /* "PyCafeDefs.pxi":858 + * def __init__( + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): # <<<<<<<<<<<<<< + * self.type = _type + * self.source = _source + */ + values[3] = ((PyObject *)Py_None); + values[4] = ((PyObject *)__pyx_int_neg_1); + values[5] = ((PyObject *)Py_None); + values[6] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_code); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_text); + if (value) { values[5] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_info); + if (value) { values[6] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 856, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v__type = values[0]; + __pyx_v__source = values[1]; + __pyx_v__handle = values[2]; + __pyx_v__pv_name = values[3]; + __pyx_v__error_code = values[4]; + __pyx_v__error_text = values[5]; + __pyx_v__error_info = values[6]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 856, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CafeException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_13CafeException___init__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self), __pyx_v__type, __pyx_v__source, __pyx_v__handle, __pyx_v__pv_name, __pyx_v__error_code, __pyx_v__error_text, __pyx_v__error_info); + + /* "PyCafeDefs.pxi":856 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_13CafeException___init__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv_name, PyObject *__pyx_v__error_code, PyObject *__pyx_v__error_text, PyObject *__pyx_v__error_info) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "PyCafeDefs.pxi":859 + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type # <<<<<<<<<<<<<< + * self.source = _source + * self.handle = _handle + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__type))||((__pyx_v__type) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__type)->tp_name), 0))) __PYX_ERR(2, 859, __pyx_L1_error) + __pyx_t_1 = __pyx_v__type; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->type); + __Pyx_DECREF(__pyx_v_self->type); + __pyx_v_self->type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":860 + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + * self.type = _type + * self.source = _source # <<<<<<<<<<<<<< + * self.handle = _handle + * self.name = _pv_name + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__source))||((__pyx_v__source) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__source)->tp_name), 0))) __PYX_ERR(2, 860, __pyx_L1_error) + __pyx_t_1 = __pyx_v__source; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->source); + __Pyx_DECREF(__pyx_v_self->source); + __pyx_v_self->source = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":861 + * self.type = _type + * self.source = _source + * self.handle = _handle # <<<<<<<<<<<<<< + * self.name = _pv_name + * self.error_code = _error_code + */ + __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_v__handle); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 861, __pyx_L1_error) + __pyx_v_self->handle = __pyx_t_2; + + /* "PyCafeDefs.pxi":862 + * self.source = _source + * self.handle = _handle + * self.name = _pv_name # <<<<<<<<<<<<<< + * self.error_code = _error_code + * self.error_text = _error_text + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__pv_name))||((__pyx_v__pv_name) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__pv_name)->tp_name), 0))) __PYX_ERR(2, 862, __pyx_L1_error) + __pyx_t_1 = __pyx_v__pv_name; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":863 + * self.handle = _handle + * self.name = _pv_name + * self.error_code = _error_code # <<<<<<<<<<<<<< + * self.error_text = _error_text + * self.error_info = _error_info + */ + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v__error_code); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 863, __pyx_L1_error) + __pyx_v_self->error_code = __pyx_t_3; + + /* "PyCafeDefs.pxi":864 + * self.name = _pv_name + * self.error_code = _error_code + * self.error_text = _error_text # <<<<<<<<<<<<<< + * self.error_info = _error_info + * + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__error_text))||((__pyx_v__error_text) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__error_text)->tp_name), 0))) __PYX_ERR(2, 864, __pyx_L1_error) + __pyx_t_1 = __pyx_v__error_text; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->error_text); + __Pyx_DECREF(__pyx_v_self->error_text); + __pyx_v_self->error_text = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":865 + * self.error_code = _error_code + * self.error_text = _error_text + * self.error_info = _error_info # <<<<<<<<<<<<<< + * + * def show(self): + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__error_info))||((__pyx_v__error_info) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__error_info)->tp_name), 0))) __PYX_ERR(2, 865, __pyx_L1_error) + __pyx_t_1 = __pyx_v__error_info; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->error_info); + __Pyx_DECREF(__pyx_v_self->error_info); + __pyx_v_self->error_info = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":856 + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + * def __init__( # <<<<<<<<<<<<<< + * self, _type="CafePVError", _source=None, _handle=0, + * _pv_name=None, _error_code=-1, _error_text=None, _error_info=None): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":867 + * self.error_info = _error_info + * + * def show(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_2show(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_2show(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":868 + * + * def show(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(self.type) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":869 + * def show(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) + */ + __pyx_t_2 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":870 + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + * print(self.type) # <<<<<<<<<<<<<< + * print("Exception raised from CyCafe method:", self.source) + * + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_self->type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":869 + * def show(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) + */ + } + + /* "PyCafeDefs.pxi":871 + * if self.type is not None: + * print(self.type) + * print("Exception raised from CyCafe method:", self.source) # <<<<<<<<<<<<<< + * + * if self.handle != 0: + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_Exception_raised_from_CyCafe_met); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_from_CyCafe_met); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Exception_raised_from_CyCafe_met); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->source); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":873 + * print("Exception raised from CyCafe method:", self.source) + * + * if self.handle != 0: # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + __pyx_t_3 = ((__pyx_v_self->handle != 0) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":875 + * if self.handle != 0: + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") # <<<<<<<<<<<<<< + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":874 + * + * if self.handle != 0: + * print("name =", self.name, "( handle =", # <<<<<<<<<<<<<< + * self.handle, ") reports the following error:") + * if (self.error_code != -1): + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_name); + __Pyx_GIVEREF(__pyx_kp_u_name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_name); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __Pyx_INCREF(__pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_kp_u_handle_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_reports_the_following_error); + __Pyx_GIVEREF(__pyx_kp_u_reports_the_following_error); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_reports_the_following_error); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":876 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if (self.error_code != -1): # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + __pyx_t_3 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":877 + * self.handle, ") reports the following error:") + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) # <<<<<<<<<<<<<< + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_kp_u_error_code_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_text_2); + __Pyx_GIVEREF(__pyx_kp_u_error_text_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_error_text_2); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->error_text); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":876 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if (self.error_code != -1): # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":878 + * if (self.error_code != -1): + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_info); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":873 + * print("Exception raised from CyCafe method:", self.source) + * + * if self.handle != 0: # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":879 + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_CafePVError, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 879, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":881 + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") # <<<<<<<<<<<<<< + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":880 + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': + * print("name =", self.name, "( handle =", # <<<<<<<<<<<<<< + * self.handle, ") reports the following error:") + * if self.error_code != -1: + */ + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_name); + __Pyx_GIVEREF(__pyx_kp_u_name); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_name); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->name); + __Pyx_INCREF(__pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_kp_u_handle_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_handle_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_reports_the_following_error); + __Pyx_GIVEREF(__pyx_kp_u_reports_the_following_error); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_reports_the_following_error); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":882 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + __pyx_t_2 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":883 + * self.handle, ") reports the following error:") + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) # <<<<<<<<<<<<<< + * print("error_info:", self.error_info) + * else: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_kp_u_error_code_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_code_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_text_2); + __Pyx_GIVEREF(__pyx_kp_u_error_text_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_error_text_2); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->error_text); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":882 + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":884 + * if self.error_code != -1: + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * else: + * print("error_info:", self.error_info) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->error_info); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":879 + * print("error_code:", self.error_code, "error_text:", self.error_text) + * print("error_info:", self.error_info) + * elif self.type == 'CafePVError': # <<<<<<<<<<<<<< + * print("name =", self.name, "( handle =", + * self.handle, ") reports the following error:") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":886 + * print("error_info:", self.error_info) + * else: + * print("error_info:", self.error_info) # <<<<<<<<<<<<<< + * print("------------------------------------------------------------------------") + * return + */ + /*else*/ { + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_info_2); + __Pyx_GIVEREF(__pyx_kp_u_error_info_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_info_2); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_info); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":887 + * else: + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":888 + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * def reveal(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":867 + * self.error_info = _error_info + * + * def show(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CafeException.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":890 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_5reveal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_5reveal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reveal (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4reveal(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4reveal(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("reveal", 0); + + /* "PyCafeDefs.pxi":891 + * + * def reveal(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(".type =", self.type) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":892 + * def reveal(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(".type =", self.type) + * print(".source =", self.source) + */ + __pyx_t_2 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":893 + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + * print(".type =", self.type) # <<<<<<<<<<<<<< + * print(".source =", self.source) + * if self.handle != 0: + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_type_2); + __Pyx_GIVEREF(__pyx_kp_u_type_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_type_2); + __Pyx_INCREF(__pyx_v_self->type); + __Pyx_GIVEREF(__pyx_v_self->type); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->type); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":892 + * def reveal(self): + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: # <<<<<<<<<<<<<< + * print(".type =", self.type) + * print(".source =", self.source) + */ + } + + /* "PyCafeDefs.pxi":894 + * if self.type is not None: + * print(".type =", self.type) + * print(".source =", self.source) # <<<<<<<<<<<<<< + * if self.handle != 0: + * print(".handle =", self.handle) + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_source_2); + __Pyx_GIVEREF(__pyx_kp_u_source_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_source_2); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->source); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":895 + * print(".type =", self.type) + * print(".source =", self.source) + * if self.handle != 0: # <<<<<<<<<<<<<< + * print(".handle =", self.handle) + * if self.name is not None: + */ + __pyx_t_3 = ((__pyx_v_self->handle != 0) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":896 + * print(".source =", self.source) + * if self.handle != 0: + * print(".handle =", self.handle) # <<<<<<<<<<<<<< + * if self.name is not None: + * print(".name =", self.name) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_kp_u_handle_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":895 + * print(".type =", self.type) + * print(".source =", self.source) + * if self.handle != 0: # <<<<<<<<<<<<<< + * print(".handle =", self.handle) + * if self.name is not None: + */ + } + + /* "PyCafeDefs.pxi":897 + * if self.handle != 0: + * print(".handle =", self.handle) + * if self.name is not None: # <<<<<<<<<<<<<< + * print(".name =", self.name) + * if self.error_code != -1: + */ + __pyx_t_3 = (__pyx_v_self->name != ((PyObject*)Py_None)); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":898 + * print(".handle =", self.handle) + * if self.name is not None: + * print(".name =", self.name) # <<<<<<<<<<<<<< + * if self.error_code != -1: + * print(".error_code =", self.error_code) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_name_2); + __Pyx_GIVEREF(__pyx_kp_u_name_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_name_2); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":897 + * if self.handle != 0: + * print(".handle =", self.handle) + * if self.name is not None: # <<<<<<<<<<<<<< + * print(".name =", self.name) + * if self.error_code != -1: + */ + } + + /* "PyCafeDefs.pxi":899 + * if self.name is not None: + * print(".name =", self.name) + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print(".error_code =", self.error_code) + * if self.error_text is not None: + */ + __pyx_t_2 = ((__pyx_v_self->error_code != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":900 + * print(".name =", self.name) + * if self.error_code != -1: + * print(".error_code =", self.error_code) # <<<<<<<<<<<<<< + * if self.error_text is not None: + * print(".error_text =", self.error_text) + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_code_3); + __Pyx_GIVEREF(__pyx_kp_u_error_code_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_code_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":899 + * if self.name is not None: + * print(".name =", self.name) + * if self.error_code != -1: # <<<<<<<<<<<<<< + * print(".error_code =", self.error_code) + * if self.error_text is not None: + */ + } + + /* "PyCafeDefs.pxi":901 + * if self.error_code != -1: + * print(".error_code =", self.error_code) + * if self.error_text is not None: # <<<<<<<<<<<<<< + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + */ + __pyx_t_2 = (__pyx_v_self->error_text != ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":902 + * print(".error_code =", self.error_code) + * if self.error_text is not None: + * print(".error_text =", self.error_text) # <<<<<<<<<<<<<< + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_error_text_3); + __Pyx_GIVEREF(__pyx_kp_u_error_text_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_error_text_3); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->error_text); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":901 + * if self.error_code != -1: + * print(".error_code =", self.error_code) + * if self.error_text is not None: # <<<<<<<<<<<<<< + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + */ + } + + /* "PyCafeDefs.pxi":903 + * if self.error_text is not None: + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) # <<<<<<<<<<<<<< + * print("------------------------------------------------------------------------") + * return + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_error_info_3); + __Pyx_GIVEREF(__pyx_kp_u_error_info_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_error_info_3); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->error_info); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":904 + * print(".error_text =", self.error_text) + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":905 + * print(".error_info =", self.error_info) + * print("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":890 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print("------CafeException-----------------------------------------------------") + * if self.type is not None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CafeException.reveal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":847 + * + * cdef class CafeException(Exception): + * cdef readonly str type # <<<<<<<<<<<<<< + * cdef readonly str source + * cdef readonly unsigned int handle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4type_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4type___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4type___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->type); + __pyx_r = __pyx_v_self->type; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":848 + * cdef class CafeException(Exception): + * cdef readonly str type + * cdef readonly str source # <<<<<<<<<<<<<< + * cdef readonly unsigned int handle + * cdef readonly str name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6source_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6source_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6source___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6source___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->source); + __pyx_r = __pyx_v_self->source; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":849 + * cdef readonly str type + * cdef readonly str source + * cdef readonly unsigned int handle # <<<<<<<<<<<<<< + * cdef readonly str name + * cdef readonly int error_code + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_6handle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6handle___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6handle___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":850 + * cdef readonly str source + * cdef readonly unsigned int handle + * cdef readonly str name # <<<<<<<<<<<<<< + * cdef readonly int error_code + * cdef readonly str error_text + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_4name_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_4name___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_4name___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":851 + * cdef readonly unsigned int handle + * cdef readonly str name + * cdef readonly int error_code # <<<<<<<<<<<<<< + * cdef readonly str error_text + * cdef readonly str error_info + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_code___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_code___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.error_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":852 + * cdef readonly str name + * cdef readonly int error_code + * cdef readonly str error_text # <<<<<<<<<<<<<< + * cdef readonly str error_info + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_text___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_text___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->error_text); + __pyx_r = __pyx_v_self->error_text; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":853 + * cdef readonly int error_code + * cdef readonly str error_text + * cdef readonly str error_info # <<<<<<<<<<<<<< + * + * #Inheriting from base clas requires __init__; __cinit__ is ignored. + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_10error_info___get__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_10error_info___get__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->error_info); + __pyx_r = __pyx_v_self->error_info; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_6__reduce_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_INCREF(__pyx_v_self->error_info); + __Pyx_GIVEREF(__pyx_v_self->error_info); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->error_info); + __Pyx_INCREF(__pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_v_self->error_text); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->error_text); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->name); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->source); + __Pyx_INCREF(__pyx_v_self->type); + __Pyx_GIVEREF(__pyx_v_self->type); + PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->type); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_4 = (__pyx_v__dict != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.error_code, self.error_info, self.error_text, self.handle, self.name, self.source, self.type) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + */ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->error_info != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->error_text != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->name != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->source != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->type != ((PyObject*)Py_None)); + __pyx_t_6 = (__pyx_t_4 != 0); + __pyx_t_5 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + */ + __pyx_t_5 = (__pyx_v_use_setstate != 0); + if (__pyx_t_5) { + + /* "(tree fragment)":13 + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CafeException); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_145648516); + __Pyx_GIVEREF(__pyx_int_145648516); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_145648516); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.error_info is not None or self.error_text is not None or self.name is not None or self.source is not None or self.type is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + */ + goto __pyx_L9; + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, None), state + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CafeException); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_145648516); + __Pyx_GIVEREF(__pyx_int_145648516); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_145648516); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + __pyx_L9:; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CafeException.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13CafeException_8__setstate_cython__(struct __pyx_obj_6PyCafe_CafeException *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_CafeException, (type(self), 0x8ae6b84, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CafeException.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":924 + * cdef readonly bint maskHasDBE_ALARM + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.monid = 0 + * # self.dataType=None + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy___cinit__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_13monitorpolicy___cinit__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":925 + * + * def __cinit__(self): + * self.monid = 0 # <<<<<<<<<<<<<< + * # self.dataType=None + * # self.dbrDataType=None + */ + __pyx_v_self->monid = 0; + + /* "PyCafeDefs.pxi":929 + * # self.dbrDataType=None + * # self.cafeDbrType=None + * self.nelem = 1 # <<<<<<<<<<<<<< + * # self.mask=None + * # self.userArgs=None + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":932 + * # self.mask=None + * # self.userArgs=None + * self.status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False + */ + __pyx_v_self->status = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":933 + * # self.userArgs=None + * self.status = ICAFE_NORMAL + * self.maskHasDBE_PROPERTY = False # <<<<<<<<<<<<<< + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False + */ + __pyx_v_self->maskHasDBE_PROPERTY = 0; + + /* "PyCafeDefs.pxi":934 + * self.status = ICAFE_NORMAL + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False # <<<<<<<<<<<<<< + * self.maskHasDBE_LOG = False + * self.maskHasDBE_ALARM = False + */ + __pyx_v_self->maskHasDBE_VALUE = 0; + + /* "PyCafeDefs.pxi":935 + * self.maskHasDBE_PROPERTY = False + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False # <<<<<<<<<<<<<< + * self.maskHasDBE_ALARM = False + * + */ + __pyx_v_self->maskHasDBE_LOG = 0; + + /* "PyCafeDefs.pxi":936 + * self.maskHasDBE_VALUE = False + * self.maskHasDBE_LOG = False + * self.maskHasDBE_ALARM = False # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_v_self->maskHasDBE_ALARM = 0; + + /* "PyCafeDefs.pxi":924 + * cdef readonly bint maskHasDBE_ALARM + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.monid = 0 + * # self.dataType=None + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":938 + * self.maskHasDBE_ALARM = False + * + * def show(self): # <<<<<<<<<<<<<< + * print("monid =", self.monid) + * print("datatype =", self.dataType) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_2show(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_2show(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":939 + * + * def show(self): + * print("monid =", self.monid) # <<<<<<<<<<<<<< + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_monid); + __Pyx_GIVEREF(__pyx_kp_u_monid); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_monid); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":940 + * def show(self): + * print("monid =", self.monid) + * print("datatype =", self.dataType) # <<<<<<<<<<<<<< + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) + */ + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_datatype); + __Pyx_GIVEREF(__pyx_kp_u_datatype); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_datatype); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":941 + * print("monid =", self.monid) + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) # <<<<<<<<<<<<<< + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) + */ + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dbrDataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_dbrDataType); + __Pyx_GIVEREF(__pyx_kp_u_dbrDataType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_dbrDataType); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":942 + * print("datatype =", self.dataType) + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) # <<<<<<<<<<<<<< + * print("nelem =", self.nelem) + * print("mask =", self.mask) + */ + __pyx_t_1 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_self->cafeDbrType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_cafeDbrType); + __Pyx_GIVEREF(__pyx_kp_u_cafeDbrType); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_cafeDbrType); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":943 + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) # <<<<<<<<<<<<<< + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_nelem); + __Pyx_GIVEREF(__pyx_kp_u_nelem); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_nelem); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":944 + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) + * print("mask =", self.mask) # <<<<<<<<<<<<<< + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_mask); + __Pyx_GIVEREF(__pyx_kp_u_mask); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_mask); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":945 + * print("nelem =", self.nelem) + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) # <<<<<<<<<<<<<< + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + */ + __pyx_t_1 = __Pyx_PyInt_From_long(((long)__pyx_v_self->userArgs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_userArgs); + __Pyx_GIVEREF(__pyx_kp_u_userArgs); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_userArgs); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":946 + * print("mask =", self.mask) + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) # <<<<<<<<<<<<<< + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_status); + __Pyx_GIVEREF(__pyx_kp_u_status); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_status); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":947 + * print("userArgs =", < long > self.userArgs) + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) # <<<<<<<<<<<<<< + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_PROPERTY); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_PROPERTY); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_PROPERTY); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":948 + * print("status =", self.status) + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) # <<<<<<<<<<<<<< + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_VALUE); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_VALUE); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_VALUE); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":949 + * print("maskHasDBE_PROPERTY=", self.maskHasDBE_PROPERTY) + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) # <<<<<<<<<<<<<< + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + * return + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_LOG); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_LOG); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_LOG); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":950 + * print("maskHasDBE_VALUE =", self.maskHasDBE_VALUE) + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_maskHasDBE_ALARM); + __Pyx_GIVEREF(__pyx_kp_u_maskHasDBE_ALARM); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_maskHasDBE_ALARM); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":951 + * print("maskHasDBE_LOG =", self.maskHasDBE_LOG) + * print("maskHasDBE_ALARM =", self.maskHasDBE_ALARM) + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":938 + * self.maskHasDBE_ALARM = False + * + * def show(self): # <<<<<<<<<<<<<< + * print("monid =", self.monid) + * print("datatype =", self.dataType) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.monitorpolicy.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":909 + * + * cdef class monitorpolicy: + * cdef readonly chtype dataType # <<<<<<<<<<<<<< + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8dataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":910 + * cdef class monitorpolicy: + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType # <<<<<<<<<<<<<< + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11dbrDataType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_chtype(__pyx_v_self->dbrDataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.dbrDataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":911 + * cdef readonly chtype dataType + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType # <<<<<<<<<<<<<< + * cdef readonly unsigned int nelem + * cdef readonly unsigned int mask + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_11cafeDbrType___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_self->cafeDbrType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.cafeDbrType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":912 + * cdef readonly chtype dbrDataType + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly unsigned int mask + * # cdef readonly pCallback handler + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5nelem___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":913 + * cdef readonly DBR_TYPE cafeDbrType + * cdef readonly unsigned int nelem + * cdef readonly unsigned int mask # <<<<<<<<<<<<<< + * # cdef readonly pCallback handler + * cdef readonly unsigned int userArgs + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4mask___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.mask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":915 + * cdef readonly unsigned int mask + * # cdef readonly pCallback handler + * cdef readonly unsigned int userArgs # <<<<<<<<<<<<<< + * # cdef readonly evid eventID + * cdef readonly int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_8userArgs___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->userArgs); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.userArgs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":917 + * cdef readonly unsigned int userArgs + * # cdef readonly evid eventID + * cdef readonly int status # <<<<<<<<<<<<<< + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_6status___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6status___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":918 + * # cdef readonly evid eventID + * cdef readonly int status + * cdef readonly unsigned int monid # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_5monid___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->monid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.monid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":919 + * cdef readonly int status + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_PROPERTY); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_PROPERTY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":920 + * cdef readonly unsigned int monid + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_LOG + * cdef readonly bint maskHasDBE_ALARM + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_VALUE.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":921 + * cdef readonly bint maskHasDBE_PROPERTY + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG # <<<<<<<<<<<<<< + * cdef readonly bint maskHasDBE_ALARM + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_14maskHasDBE_LOG___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_LOG); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_LOG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":922 + * cdef readonly bint maskHasDBE_VALUE + * cdef readonly bint maskHasDBE_LOG + * cdef readonly bint maskHasDBE_ALARM # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM___get__(struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_ALARM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.maskHasDBE_ALARM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_13monitorpolicy_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.monitorpolicy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":973 + * + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6pvdata___cinit__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata___cinit__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":974 + * + * def __cinit__(self): + * self.nelem = 1 # <<<<<<<<<<<<<< + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":975 + * def __cinit__(self): + * self.nelem = 1 + * self.alarmStatus = -1 # <<<<<<<<<<<<<< + * self.alarmSeverity = -1 + * self.ts = [] + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":976 + * self.nelem = 1 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 # <<<<<<<<<<<<<< + * self.ts = [] + * self.tsDate = [] + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":977 + * self.alarmStatus = -1 + * self.alarmSeverity = -1 + * self.ts = [] # <<<<<<<<<<<<<< + * self.tsDate = [] + * self.tsDateAsString = '' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->ts); + __Pyx_DECREF(__pyx_v_self->ts); + __pyx_v_self->ts = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":978 + * self.alarmSeverity = -1 + * self.ts = [] + * self.tsDate = [] # <<<<<<<<<<<<<< + * self.tsDateAsString = '' + * self.bsDateAsString = '' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->tsDate); + __Pyx_DECREF(__pyx_v_self->tsDate); + __pyx_v_self->tsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":979 + * self.ts = [] + * self.tsDate = [] + * self.tsDateAsString = '' # <<<<<<<<<<<<<< + * self.bsDateAsString = '' + * self.value = [] + */ + __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_GIVEREF(__pyx_kp_u__5); + __Pyx_GOTREF(__pyx_v_self->tsDateAsString); + __Pyx_DECREF(__pyx_v_self->tsDateAsString); + __pyx_v_self->tsDateAsString = __pyx_kp_u__5; + + /* "PyCafeDefs.pxi":980 + * self.tsDate = [] + * self.tsDateAsString = '' + * self.bsDateAsString = '' # <<<<<<<<<<<<<< + * self.value = [] + * self.status = 1 + */ + __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_GIVEREF(__pyx_kp_u__5); + __Pyx_GOTREF(__pyx_v_self->bsDateAsString); + __Pyx_DECREF(__pyx_v_self->bsDateAsString); + __pyx_v_self->bsDateAsString = __pyx_kp_u__5; + + /* "PyCafeDefs.pxi":981 + * self.tsDateAsString = '' + * self.bsDateAsString = '' + * self.value = [] # <<<<<<<<<<<<<< + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":982 + * self.bsDateAsString = '' + * self.value = [] + * self.status = 1 # <<<<<<<<<<<<<< + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":983 + * self.value = [] + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' # <<<<<<<<<<<<<< + * self.pulseID = 0 + * self.dataType = -1 + */ + __Pyx_INCREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GIVEREF(__pyx_n_u_ICAFE_NORMAL); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = __pyx_n_u_ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":984 + * self.status = 1 + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 # <<<<<<<<<<<<<< + * self.dataType = -1 + * self.dataTypeAsString = "" + */ + __pyx_v_self->pulseID = 0; + + /* "PyCafeDefs.pxi":985 + * self.statusAsString = 'ICAFE_NORMAL' + * self.pulseID = 0 + * self.dataType = -1 # <<<<<<<<<<<<<< + * self.dataTypeAsString = "" + * + */ + __pyx_v_self->dataType = -1; + + /* "PyCafeDefs.pxi":986 + * self.pulseID = 0 + * self.dataType = -1 + * self.dataTypeAsString = "" # <<<<<<<<<<<<<< + * + * def show(self): + */ + __Pyx_INCREF(__pyx_kp_u__5); + __Pyx_GIVEREF(__pyx_kp_u__5); + __Pyx_GOTREF(__pyx_v_self->dataTypeAsString); + __Pyx_DECREF(__pyx_v_self->dataTypeAsString); + __pyx_v_self->dataTypeAsString = __pyx_kp_u__5; + + /* "PyCafeDefs.pxi":973 + * + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.nelem = 1 + * self.alarmStatus = -1 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":988 + * self.dataTypeAsString = "" + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_2show(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_2show(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":989 + * + * def show(self): + * self.showPrint(self.nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvdata *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":990 + * def show(self): + * self.showPrint(self.nelem) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":988 + * self.dataTypeAsString = "" + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(self.nelem) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvdata.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":992 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5showMax(PyObject *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_4showMax(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_nelem)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_4showMax(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":993 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_nelem, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 993, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 993, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":997 + * # print ("Note: Max. Nelem =", self.nelem + * # print ("----------------------" + * nelem = self.nelem # <<<<<<<<<<<<<< + * + * self.showPrint(nelem) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":993 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":999 + * nelem = self.nelem + * + * self.showPrint(nelem) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvdata *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v_nelem); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1000 + * + * self.showPrint(nelem) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, nelem): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":992 + * return + * + * def showMax(self, nelem): # <<<<<<<<<<<<<< + * if nelem > self.nelem: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvdata.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_nelem); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1002 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + +static PyObject *__pyx_f_6PyCafe_6pvdata_showPrint(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_nelem) { + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + long __pyx_t_9; + long __pyx_t_10; + unsigned int __pyx_t_11; + Py_ssize_t __pyx_t_12; + Py_UCS4 __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":1006 + * # is self.value[0] a list + * + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1006, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1006, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1007 + * + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1007, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1008 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_value_4, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1009 + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * else: + * print("value = {} ({})".format( + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1009, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_self->dataTypeAsString}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_self->dataTypeAsString}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __Pyx_GIVEREF(__pyx_v_self->dataTypeAsString); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_self->dataTypeAsString); + __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1008 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1009 + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * else: + * print("value = {} ({})".format( + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 1009, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1008 + * if nelem == 1: + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0][0], self.dataTypeAsString), end="") + * else: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1007 + * + * if nelem == 1: + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * print("value = {} ({})".format( + * self.value[0][0], self.dataTypeAsString), end="") + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":1011 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_value_4, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":1012 + * else: + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * print("") + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1012, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_self->dataTypeAsString}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_self->dataTypeAsString}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __Pyx_GIVEREF(__pyx_v_self->dataTypeAsString); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_self->dataTypeAsString); + __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1011 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1012 + * else: + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") # <<<<<<<<<<<<<< + * print("") + * else: + */ + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 1012, __pyx_L1_error) + + /* "PyCafeDefs.pxi":1011 + * self.value[0][0], self.dataTypeAsString), end="") + * else: + * print("value = {} ({})".format( # <<<<<<<<<<<<<< + * self.value[0], self.dataTypeAsString), end="") + * print("") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":1013 + * print("value = {} ({})".format( + * self.value[0], self.dataTypeAsString), end="") + * print("") # <<<<<<<<<<<<<< + * else: + * print("value = ", end="") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1006 + * # is self.value[0] a list + * + * if nelem == 1: # <<<<<<<<<<<<<< + * if isinstance(self.value[0], list): + * print("value = {} ({})".format( + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1015 + * print("") + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 1015, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__21, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1017 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1017, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyList_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1018 + * + * if isinstance(self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + */ + __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1018, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafeDefs.pxi":1019 + * if isinstance(self.value[0], list): + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * else: + * for i in range(0, nelem): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1019, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 1019, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafeDefs.pxi":1017 + * print("value = ", end="") + * + * if isinstance(self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print(self.value[0][i], "[%d]" % i, end=" ") + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":1021 + * print(self.value[0][i], "[%d]" % i, end=" ") + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print(self.value[i], "[%d]" % i, end=" ") + * print("({0})".format(self.dataTypeAsString)) + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1021, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafeDefs.pxi":1022 + * else: + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") # <<<<<<<<<<<<<< + * print("({0})".format(self.dataTypeAsString)) + * + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1022, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->value, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8); + __pyx_t_5 = 0; + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 1022, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + } + __pyx_L5:; + + /* "PyCafeDefs.pxi":1023 + * for i in range(0, nelem): + * print(self.value[i], "[%d]" % i, end=" ") + * print("({0})".format(self.dataTypeAsString)) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_v_self->dataTypeAsString) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_self->dataTypeAsString); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1026 + * + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) # <<<<<<<<<<<<<< + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_status_2); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_status_2); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_status_2); + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__6); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->statusAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__7); + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1026, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1027 + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + */ + __pyx_t_2 = ((__pyx_v_self->alarmStatus != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1028 + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmStatus); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmStatus); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_alarmStatus); + + /* "PyCafeDefs.pxi":1029 + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->alarmStatus, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__6); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->alarmStatusAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":1028 + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: + * print("alarmStatus = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1030 + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + */ + __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = 0; + __pyx_t_13 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmSeverity); + __pyx_t_12 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmSeverity); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_alarmSeverity); + + /* "PyCafeDefs.pxi":1031 + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) # <<<<<<<<<<<<<< + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], + */ + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_self->alarmSeverity, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_12 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__6); + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->alarmSeverityAsString); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_13; + __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_12 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":1030 + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % # <<<<<<<<<<<<<< + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + */ + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1027 + * + * print("status = %d (%s)" % (self.status, self.statusAsString)) + * if self.alarmStatus != -1: # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % + * (self.alarmStatus, self.alarmStatusAsString)) + */ + } + + /* "PyCafeDefs.pxi":1032 + * print("alarmSeverity = %d (%s)" % + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) # <<<<<<<<<<<<<< + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], + */ + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1032, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1032, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_kp_u_ts); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __pyx_t_8 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1033 + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], # <<<<<<<<<<<<<< + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1033, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1033, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":1034 + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], # <<<<<<<<<<<<<< + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1034, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1034, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1035 + * print("tsDate =", self.tsDate[0], self.tsDate[1], + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) # <<<<<<<<<<<<<< + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1035, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1035, __pyx_L1_error) + } + __pyx_t_14 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1035, __pyx_L1_error) + } + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + + /* "PyCafeDefs.pxi":1033 + * (self.alarmSeverity, self.alarmSeverityAsString)) + * print("ts =", self.ts[0], self.ts[1]) + * print("tsDate =", self.tsDate[0], self.tsDate[1], # <<<<<<<<<<<<<< + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + */ + __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_15); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_t_8 = 0; + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1036 + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: # <<<<<<<<<<<<<< + * print("pulseID =", self.pulseID) + * return + */ + __pyx_t_2 = ((__pyx_v_self->pulseID > 0) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1037 + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_15 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulseID); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_pulseID); + __Pyx_GIVEREF(__pyx_kp_u_pulseID); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_pulseID); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15); + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1037, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1036 + * self.tsDate[2], self.tsDate[3], + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * if self.pulseID > 0: # <<<<<<<<<<<<<< + * print("pulseID =", self.pulseID) + * return + */ + } + + /* "PyCafeDefs.pxi":1038 + * if self.pulseID > 0: + * print("pulseID =", self.pulseID) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1002 + * return + * + * cdef showPrint(self, nelem): # <<<<<<<<<<<<<< + * cdef unsigned int i + * # is self.value[0] a list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.pvdata.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":956 + * ################################################################################## + * cdef class pvdata: + * cdef readonly unsigned int nelem # <<<<<<<<<<<<<< + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_5nelem___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_5nelem___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.nelem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":957 + * cdef class pvdata: + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus # <<<<<<<<<<<<<< + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_11alarmStatus___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.alarmStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":958 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_13alarmSeverity___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.alarmSeverity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":959 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString # <<<<<<<<<<<<<< + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_19alarmStatusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->alarmStatusAsString); + __pyx_r = __pyx_v_self->alarmStatusAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":960 + * cdef readonly int alarmSeverity + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString # <<<<<<<<<<<<<< + * cdef readonly list ts + * cdef readonly list tsDate + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_21alarmSeverityAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->alarmSeverityAsString); + __pyx_r = __pyx_v_self->alarmSeverityAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":961 + * cdef readonly str alarmStatusAsString + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts # <<<<<<<<<<<<<< + * cdef readonly list tsDate + * cdef readonly str tsDateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_2ts_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_2ts_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_2ts___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_2ts___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->ts); + __pyx_r = __pyx_v_self->ts; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":962 + * cdef readonly str alarmSeverityAsString + * cdef readonly list ts + * cdef readonly list tsDate # <<<<<<<<<<<<<< + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6tsDate___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6tsDate___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->tsDate); + __pyx_r = __pyx_v_self->tsDate; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":963 + * cdef readonly list ts + * cdef readonly list tsDate + * cdef readonly str tsDateAsString # <<<<<<<<<<<<<< + * cdef readonly str bsDateAsString + * cdef readonly list value + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14tsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->tsDateAsString); + __pyx_r = __pyx_v_self->tsDateAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":964 + * cdef readonly list tsDate + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString # <<<<<<<<<<<<<< + * cdef readonly list value + * cdef public int status + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14bsDateAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->bsDateAsString); + __pyx_r = __pyx_v_self->bsDateAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":965 + * cdef readonly str tsDateAsString + * cdef readonly str bsDateAsString + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef public int status + * cdef public str statusAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5value_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_5value_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_5value___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_5value___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->value); + __pyx_r = __pyx_v_self->value; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":966 + * cdef readonly str bsDateAsString + * cdef readonly list value + * cdef public int status # <<<<<<<<<<<<<< + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_6status_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6status___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6status___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6status_2__set__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_6status_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 966, __pyx_L1_error) + __pyx_v_self->status = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvdata.status.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":967 + * cdef readonly list value + * cdef public int status + * cdef public str statusAsString # <<<<<<<<<<<<<< + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_14statusAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->statusAsString); + __pyx_r = __pyx_v_self->statusAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_2__set__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__set__", 0); + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 967, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.statusAsString.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6pvdata_14statusAsString_4__del__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->statusAsString); + __Pyx_DECREF(__pyx_v_self->statusAsString); + __pyx_v_self->statusAsString = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":968 + * cdef public int status + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID # <<<<<<<<<<<<<< + * cdef readonly int dataType + * cdef readonly str dataTypeAsString + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_7pulseID___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_7pulseID___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_self->pulseID); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.pulseID.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":969 + * cdef public str statusAsString + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType # <<<<<<<<<<<<<< + * cdef readonly str dataTypeAsString + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_8dataType___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_8dataType___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dataType); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.dataType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":970 + * cdef readonly unsigned long long pulseID + * cdef readonly int dataType + * cdef readonly str dataTypeAsString # <<<<<<<<<<<<<< + * + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_16dataTypeAsString___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->dataTypeAsString); + __pyx_r = __pyx_v_self->dataTypeAsString; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvdata.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1054 + * cdef public bint hasTS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_7pvgroup___cinit__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup___cinit__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":1055 + * + * def __cinit__(self): + * self.groupStatus = ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.rule = True + * self.hasAlarm = True + */ + __pyx_v_self->groupStatus = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":1056 + * def __cinit__(self): + * self.groupStatus = ICAFE_NORMAL + * self.rule = True # <<<<<<<<<<<<<< + * self.hasAlarm = True + * self.hasTS = True + */ + __pyx_v_self->rule = 1; + + /* "PyCafeDefs.pxi":1057 + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + * self.hasAlarm = True # <<<<<<<<<<<<<< + * self.hasTS = True + * + */ + __pyx_v_self->hasAlarm = 1; + + /* "PyCafeDefs.pxi":1058 + * self.rule = True + * self.hasAlarm = True + * self.hasTS = True # <<<<<<<<<<<<<< + * + * return + */ + __pyx_v_self->hasTS = 1; + + /* "PyCafeDefs.pxi":1060 + * self.hasTS = True + * + * return # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1054 + * cdef public bint hasTS + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.groupStatus = ICAFE_NORMAL + * self.rule = True + */ + + /* function exit code */ + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1062 + * return + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(npv=self.npv, grouplist=None) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_2show(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_2show(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":1063 + * + * def show(self): + * self.showPrint(npv=self.npv, grouplist=None) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1064 + * def show(self): + * self.showPrint(npv=self.npv, grouplist=None) + * return # <<<<<<<<<<<<<< + * + * def showWithPV(self, glist): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1062 + * return + * + * def show(self): # <<<<<<<<<<<<<< + * self.showPrint(npv=self.npv, grouplist=None) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvgroup.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1066 + * return + * + * def showWithPV(self, glist): # <<<<<<<<<<<<<< + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5showWithPV(PyObject *__pyx_v_self, PyObject *__pyx_v_glist); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5showWithPV(PyObject *__pyx_v_self, PyObject *__pyx_v_glist) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showWithPV (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4showWithPV(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_glist)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4showWithPV(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_glist) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("showWithPV", 0); + + /* "PyCafeDefs.pxi":1067 + * + * def showWithPV(self, glist): + * if len(glist) != self.npv: # <<<<<<<<<<<<<< + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + */ + __pyx_t_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1067, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->npv) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1068 + * def showWithPV(self, glist): + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") # <<<<<<<<<<<<<< + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1069 + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), # <<<<<<<<<<<<<< + * "members while group has", self.npv, "!!") + * return + */ + __pyx_t_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1069, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafeDefs.pxi":1070 + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") # <<<<<<<<<<<<<< + * return + * self.showPrint(self.npv, grouplist=glist) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafeDefs.pxi":1069 + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), # <<<<<<<<<<<<<< + * "members while group has", self.npv, "!!") + * return + */ + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_glist); + __Pyx_GIVEREF(__pyx_v_glist); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_glist); + __Pyx_INCREF(__pyx_n_u_has); + __Pyx_GIVEREF(__pyx_n_u_has); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_has); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_members_while_group_has); + __Pyx_GIVEREF(__pyx_kp_u_members_while_group_has); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u_members_while_group_has); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u__25); + __Pyx_GIVEREF(__pyx_kp_u__25); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__25); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":1071 + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + * return # <<<<<<<<<<<<<< + * self.showPrint(self.npv, grouplist=glist) + * return + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1067 + * + * def showWithPV(self, glist): + * if len(glist) != self.npv: # <<<<<<<<<<<<<< + * print("ERROR: GROUP MEMBER MISMATCH!!") + * print(glist, "has", len(glist), + */ + } + + /* "PyCafeDefs.pxi":1072 + * "members while group has", self.npv, "!!") + * return + * self.showPrint(self.npv, grouplist=glist) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_t_4, __pyx_v_glist); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1073 + * return + * self.showPrint(self.npv, grouplist=glist) + * return # <<<<<<<<<<<<<< + * + * def showMax(self, _npv): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1066 + * return + * + * def showWithPV(self, glist): # <<<<<<<<<<<<<< + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.pvgroup.showWithPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1075 + * return + * + * def showMax(self, _npv): # <<<<<<<<<<<<<< + * if _npv > self.npv: + * # print ("----------------------" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_7showMax(PyObject *__pyx_v_self, PyObject *__pyx_v__npv); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_7showMax(PyObject *__pyx_v_self, PyObject *__pyx_v__npv) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("showMax (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6showMax(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v__npv)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6showMax(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v__npv) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v__npv); + + /* "PyCafeDefs.pxi":1076 + * + * def showMax(self, _npv): + * if _npv > self.npv: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Npv =", self.npv + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_v__npv, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1076, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1076, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1080 + * # print ("Note: Max. Npv =", self.npv + * # print ("----------------------" + * _npv = self.npv # <<<<<<<<<<<<<< + * self.showPrint(npv=_npv, grouplist=None) + * return + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v__npv, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1076 + * + * def showMax(self, _npv): + * if _npv > self.npv: # <<<<<<<<<<<<<< + * # print ("----------------------" + * # print ("Note: Max. Npv =", self.npv + */ + } + + /* "PyCafeDefs.pxi":1081 + * # print ("----------------------" + * _npv = self.npv + * self.showPrint(npv=_npv, grouplist=None) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_6PyCafe_pvgroup *)__pyx_v_self->__pyx_vtab)->showPrint(__pyx_v_self, __pyx_v__npv, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1082 + * _npv = self.npv + * self.showPrint(npv=_npv, grouplist=None) + * return # <<<<<<<<<<<<<< + * + * cdef showPrint(self, npv, grouplist): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1075 + * return + * + * def showMax(self, _npv): # <<<<<<<<<<<<<< + * if _npv > self.npv: + * # print ("----------------------" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvgroup.showMax", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__npv); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1084 + * return + * + * cdef showPrint(self, npv, grouplist): # <<<<<<<<<<<<<< + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + */ + +static PyObject *__pyx_f_6PyCafe_7pvgroup_showPrint(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_npv, PyObject *__pyx_v_grouplist) { + unsigned int __pyx_v_i; + unsigned int __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + long __pyx_t_3; + long __pyx_t_4; + unsigned int __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_UCS4 __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":1085 + * + * cdef showPrint(self, npv, grouplist): + * print("GROUP NAME = ", self.name) # <<<<<<<<<<<<<< + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_NAME); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_NAME); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_NAME); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1086 + * cdef showPrint(self, npv, grouplist): + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) # <<<<<<<<<<<<<< + * print("GROUP STATUS = ", self.groupStatus) + * print("No. Members = ", self.npv) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->groupHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_HANDLE); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_HANDLE); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_HANDLE); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1087 + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) # <<<<<<<<<<<<<< + * print("No. Members = ", self.npv) + * cdef unsigned int i, j + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->groupStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_GROUP_STATUS); + __Pyx_GIVEREF(__pyx_kp_u_GROUP_STATUS); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_GROUP_STATUS); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1088 + * print("GROUP HANDLE = ", self.groupHandle) + * print("GROUP STATUS = ", self.groupStatus) + * print("No. Members = ", self.npv) # <<<<<<<<<<<<<< + * cdef unsigned int i, j + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_No_Members); + __Pyx_GIVEREF(__pyx_kp_u_No_Members); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_No_Members); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1091 + * cdef unsigned int i, j + * + * for i in range(0, npv): # <<<<<<<<<<<<<< + * print("Member: ", i, "---------------------------------") + * if grouplist: + */ + __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_v_npv); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1091, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1092 + * + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") # <<<<<<<<<<<<<< + * if grouplist: + * print("PV =", grouplist[i]) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_Member); + __Pyx_GIVEREF(__pyx_kp_u_Member); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Member); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u__26); + __Pyx_GIVEREF(__pyx_kp_u__26); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__26); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1093 + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print("PV =", grouplist[i]) + * + */ + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_grouplist); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 1093, __pyx_L1_error) + if (__pyx_t_6) { + + /* "PyCafeDefs.pxi":1094 + * print("Member: ", i, "---------------------------------") + * if grouplist: + * print("PV =", grouplist[i]) # <<<<<<<<<<<<<< + * + * print("value = ", end="") + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_grouplist, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_PV); + __Pyx_GIVEREF(__pyx_kp_u_PV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_PV); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1093 + * for i in range(0, npv): + * print("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print("PV =", grouplist[i]) + * + */ + } + + /* "PyCafeDefs.pxi":1096 + * print("PV =", grouplist[i]) + * + * print("value = ", end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__5) < 0) __PYX_ERR(2, 1096, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1097 + * + * print("value = ", end="") + * for j in range(0, len(self.pvdata[i].value)): # <<<<<<<<<<<<<< + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + * + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1097, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 1097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_j = __pyx_t_9; + + /* "PyCafeDefs.pxi":1098 + * print("value = ", end="") + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") # <<<<<<<<<<<<<< + * + * print("") + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1098, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_j, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_d_2, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10); + __pyx_t_1 = 0; + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_end, __pyx_kp_u__12) < 0) __PYX_ERR(2, 1098, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1100 + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + * + * print("") # <<<<<<<<<<<<<< + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1101 + * + * print("") + * print("status = %d (%s)" % # <<<<<<<<<<<<<< + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_status_2); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_status_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_status_2); + + /* "PyCafeDefs.pxi":1102 + * print("") + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) # <<<<<<<<<<<<<< + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1102, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_status_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__6); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1102, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_statusAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":1101 + * + * print("") + * print("status = %d (%s)" % # <<<<<<<<<<<<<< + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1103 + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmStatus); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmStatus); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_alarmStatus); + + /* "PyCafeDefs.pxi":1104 + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) # <<<<<<<<<<<<<< + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1104, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmStatus_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__6); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1104, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmStatusAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":1103 + * print("status = %d (%s)" % + * (self.pvdata[i].status, self.pvdata[i].statusAsString)) + * print("alarmStatus = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1105 + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + */ + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_11 = 127; + __Pyx_INCREF(__pyx_kp_u_alarmSeverity); + __pyx_t_7 += 16; + __Pyx_GIVEREF(__pyx_kp_u_alarmSeverity); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_alarmSeverity); + + /* "PyCafeDefs.pxi":1106 + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) # <<<<<<<<<<<<<< + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1106, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmSeverity_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__6); + __pyx_t_7 += 2; + __Pyx_GIVEREF(__pyx_kp_u__6); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__6); + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1106, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_alarmSeverityAsString); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_11; + __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_10); + __pyx_t_10 = 0; + __Pyx_INCREF(__pyx_kp_u__7); + __pyx_t_7 += 1; + __Pyx_GIVEREF(__pyx_kp_u__7); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__7); + + /* "PyCafeDefs.pxi":1105 + * print("alarmStatus = %d (%s)" % ( + * self.pvdata[i].alarmStatus, self.pvdata[i].alarmStatusAsString)) + * print("alarmSeverity = %d (%s)" % ( # <<<<<<<<<<<<<< + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + */ + __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1108 + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) # <<<<<<<<<<<<<< + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1108, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1108, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ts_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1107 + * print("alarmSeverity = %d (%s)" % ( + * self.pvdata[i].alarmSeverity, self.pvdata[i].alarmSeverityAsString)) + * print("ts =", # <<<<<<<<<<<<<< + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + */ + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_kp_u_ts); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_ts); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10); + __pyx_t_1 = 0; + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafeDefs.pxi":1109 + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1109, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1109, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1110 + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1110, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1110, __pyx_L1_error) + } + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_13, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "PyCafeDefs.pxi":1111 + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) # <<<<<<<<<<<<<< + * print("--------------------------------------------") + * return + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1111, __pyx_L1_error) + } + __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_14, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1111, __pyx_L1_error) + } + __pyx_t_14 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_15, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 1111, __pyx_L1_error) + } + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_self->pvdata, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_16, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafeDefs.pxi":1109 + * print("ts =", + * self.pvdata[i].ts[0], self.pvdata[i].ts[1]) + * print("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], # <<<<<<<<<<<<<< + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + */ + __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_15); + __pyx_t_10 = 0; + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_12 = 0; + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafeDefs.pxi":1112 + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + + /* "PyCafeDefs.pxi":1113 + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1084 + * return + * + * cdef showPrint(self, npv, grouplist): # <<<<<<<<<<<<<< + * print("GROUP NAME = ", self.name) + * print("GROUP HANDLE = ", self.groupHandle) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.pvgroup.showPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1045 + * ################################################################################## + * cdef class pvgroup: + * cdef public list pvdata # <<<<<<<<<<<<<< + * cdef public unsigned int npv + * cdef public string name + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_6pvdata___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->pvdata); + __pyx_r = __pyx_v_self->pvdata; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__set__", 0); + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 1045, __pyx_L1_error) + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pvdata); + __Pyx_DECREF(__pyx_v_self->pvdata); + __pyx_v_self->pvdata = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.pvdata.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_6pvdata_4__del__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->pvdata); + __Pyx_DECREF(__pyx_v_self->pvdata); + __pyx_v_self->pvdata = ((PyObject*)Py_None); + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1046 + * cdef class pvgroup: + * cdef public list pvdata + * cdef public unsigned int npv # <<<<<<<<<<<<<< + * cdef public string name + * cdef readonly int groupStatus + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_3npv___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_3npv___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.npv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_3npv_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1046, __pyx_L1_error) + __pyx_v_self->npv = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.npv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1047 + * cdef public list pvdata + * cdef public unsigned int npv + * cdef public string name # <<<<<<<<<<<<<< + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4name_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4name___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4name___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_4name_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + std::string __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1047, __pyx_L1_error) + __pyx_v_self->name = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1048 + * cdef public unsigned int npv + * cdef public string name + * cdef readonly int groupStatus # <<<<<<<<<<<<<< + * cdef public unsigned int groupHandle + * cdef public bint rule + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupStatus___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->groupStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.groupStatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1049 + * cdef public string name + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle # <<<<<<<<<<<<<< + * cdef public bint rule + * cdef public bint hasAlarm + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_11groupHandle___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->groupHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.groupHandle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_11groupHandle_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1049, __pyx_L1_error) + __pyx_v_self->groupHandle = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.groupHandle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1050 + * cdef readonly int groupStatus + * cdef public unsigned int groupHandle + * cdef public bint rule # <<<<<<<<<<<<<< + * cdef public bint hasAlarm + * cdef public bint hasTS + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4rule___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_4rule___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rule); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.rule.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_4rule_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1050, __pyx_L1_error) + __pyx_v_self->rule = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.rule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1051 + * cdef public unsigned int groupHandle + * cdef public bint rule + * cdef public bint hasAlarm # <<<<<<<<<<<<<< + * cdef public bint hasTS + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8hasAlarm___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasAlarm); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.hasAlarm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_8hasAlarm_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1051, __pyx_L1_error) + __pyx_v_self->hasAlarm = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.hasAlarm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1052 + * cdef public bint rule + * cdef public bint hasAlarm + * cdef public bint hasTS # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_5hasTS___get__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.hasTS.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_7pvgroup_5hasTS_2__set__(struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1052, __pyx_L1_error) + __pyx_v_self->hasTS = __pyx_t_1; + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.pvgroup.hasTS.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_7pvgroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.pvgroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1118 + * ################################################################################## + * + * cdef encodeString(bytes_input): # <<<<<<<<<<<<<< + * bytesVal = bytes_input + * encoding = False + */ + +static PyObject *__pyx_f_6PyCafe_encodeString(PyObject *__pyx_v_bytes_input) { + PyObject *__pyx_v_bytesVal = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + __Pyx_RefNannySetupContext("encodeString", 0); + + /* "PyCafeDefs.pxi":1119 + * + * cdef encodeString(bytes_input): + * bytesVal = bytes_input # <<<<<<<<<<<<<< + * encoding = False + * if not encoding: + */ + __Pyx_INCREF(__pyx_v_bytes_input); + __pyx_v_bytesVal = __pyx_v_bytes_input; + + /* "PyCafeDefs.pxi":1120 + * cdef encodeString(bytes_input): + * bytesVal = bytes_input + * encoding = False # <<<<<<<<<<<<<< + * if not encoding: + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafeDefs.pxi":1121 + * bytesVal = bytes_input + * encoding = False + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1122 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "PyCafeDefs.pxi":1123 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * #print('utf-8 for umlauts CONFIRMED!') + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1123, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1123, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_strVal = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1124 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * #print('utf-8 for umlauts CONFIRMED!') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1122 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1126 + * encoding = True + * #print('utf-8 for umlauts CONFIRMED!') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L5_exception_handled; + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "PyCafeDefs.pxi":1122 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + __pyx_L9_try_end:; + } + + /* "PyCafeDefs.pxi":1121 + * bytesVal = bytes_input + * encoding = False + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafeDefs.pxi":1128 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1129 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + /*try:*/ { + + /* "PyCafeDefs.pxi":1130 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * #print('utf-16 for umlauts') + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1130, __pyx_L11_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_utf_16) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_16); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1130, __pyx_L11_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1131 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * #print('utf-16 for umlauts') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1129 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L16_try_end; + __pyx_L11_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1133 + * encoding = True + * #print('utf-16 for umlauts') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L12_exception_handled; + } + goto __pyx_L13_except_error; + __pyx_L13_except_error:; + + /* "PyCafeDefs.pxi":1129 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); + goto __pyx_L1_error; + __pyx_L12_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); + __pyx_L16_try_end:; + } + + /* "PyCafeDefs.pxi":1128 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafeDefs.pxi":1135 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal= (bytesVal).decode('latin-1') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1136 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "PyCafeDefs.pxi":1137 + * if not encoding: + * try: + * strVal= (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * #print('latin1 for umlauts') + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1137, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_latin_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_latin_1); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1137, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1138 + * try: + * strVal= (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * #print('latin1 for umlauts') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1136 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L23_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":1140 + * encoding = True + * #print('latin1 for umlauts') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L19_exception_handled; + } + goto __pyx_L20_except_error; + __pyx_L20_except_error:; + + /* "PyCafeDefs.pxi":1136 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + __pyx_L23_try_end:; + } + + /* "PyCafeDefs.pxi":1135 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal= (bytesVal).decode('latin-1') + */ + } + + /* "PyCafeDefs.pxi":1142 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = bytes_input + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":1143 + * pass + * if not encoding: + * strVal = bytes_input # <<<<<<<<<<<<<< + * + * return strVal + */ + __Pyx_INCREF(__pyx_v_bytes_input); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_v_bytes_input); + + /* "PyCafeDefs.pxi":1142 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = bytes_input + * + */ + } + + /* "PyCafeDefs.pxi":1145 + * strVal = bytes_input + * + * return strVal # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(2, 1145, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_strVal); + __pyx_r = __pyx_v_strVal; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1118 + * ################################################################################## + * + * cdef encodeString(bytes_input): # <<<<<<<<<<<<<< + * bytesVal = bytes_input + * encoding = False + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.encodeString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1149 + * + * ################################################################################## + * cdef getMatchedDataType(dt, dtn): # <<<<<<<<<<<<<< + * # dt: input from user + * # dtn: native type + */ + +static PyObject *__pyx_f_6PyCafe_getMatchedDataType(PyObject *__pyx_v_dt, PyObject *__pyx_v_dtn) { + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("getMatchedDataType", 0); + + /* "PyCafeDefs.pxi":1154 + * # dtcheck: matching data type for pvd convert method + * + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * + * if dt in ['uchar', 'uint8']: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_dtn); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1154, __pyx_L1_error) + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1156 + * cdef unsigned int dtcheck = dtn + * + * if dt in ['uchar', 'uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1156, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1156, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1157 + * + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR # <<<<<<<<<<<<<< + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + */ + __pyx_v_dtcheck = CAFE_CHAR; + + /* "PyCafeDefs.pxi":1156 + * cdef unsigned int dtcheck = dtn + * + * if dt in ['uchar', 'uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1158 + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1159 + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR # <<<<<<<<<<<<<< + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + */ + __pyx_v_dtcheck = CAFE_CHAR; + + /* "PyCafeDefs.pxi":1158 + * if dt in ['uchar', 'uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['np.uint8']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1160 + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1160, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1160, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1161 + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT # <<<<<<<<<<<<<< + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + */ + __pyx_v_dtcheck = CAFE_USHORT; + + /* "PyCafeDefs.pxi":1160 + * elif dt in ['np.uint8']: + * dtcheck = CAFE_CHAR + * elif dt in ['ushort', 'uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1162 + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1162, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1162, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1163 + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT # <<<<<<<<<<<<<< + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + */ + __pyx_v_dtcheck = CAFE_USHORT; + + /* "PyCafeDefs.pxi":1162 + * elif dt in ['ushort', 'uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['np.ushort', 'np.uint16']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1164 + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1164, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1164, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1164, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1164, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1164, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L10_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1165 + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT # <<<<<<<<<<<<<< + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + */ + __pyx_v_dtcheck = CAFE_SHORT; + + /* "PyCafeDefs.pxi":1164 + * elif dt in ['np.ushort', 'np.uint16']: + * dtcheck = CAFE_USHORT + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1166 + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1166, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1166, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1166, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1166, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1166, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1167 + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT # <<<<<<<<<<<<<< + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + */ + __pyx_v_dtcheck = CAFE_SHORT; + + /* "PyCafeDefs.pxi":1166 + * elif dt in ['short', 'int16', 'int8', 'bool', 'byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1168 + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1168, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L20_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1169 + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG # <<<<<<<<<<<<<< + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + */ + __pyx_v_dtcheck = CAFE_LONG; + + /* "PyCafeDefs.pxi":1168 + * elif dt in ['np.short', 'np.int16', 'np.int8', 'np.bool_', 'np.byte']: + * dtcheck = CAFE_SHORT + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1170 + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_intc, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_long, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L26_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1170, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L26_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1171 + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG # <<<<<<<<<<<<<< + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + */ + __pyx_v_dtcheck = CAFE_LONG; + + /* "PyCafeDefs.pxi":1170 + * elif dt in ['int', 'int_', 'uint', 'ushort', 'int32', 'uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1172 + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_double, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L32_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1172, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L32_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1173 + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + */ + __pyx_v_dtcheck = CAFE_DOUBLE; + + /* "PyCafeDefs.pxi":1172 + * elif dt in ['np.intc', 'np.int_', 'np.long', 'np.ushort', 'np.int32', 'np.uint32']: + * dtcheck = CAFE_LONG + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1174 + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_long, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_ulong, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_int64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_uint64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1174, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L38_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1175 + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + */ + __pyx_v_dtcheck = CAFE_DOUBLE; + + /* "PyCafeDefs.pxi":1174 + * elif dt in ['double', 'float', 'float_', 'float64', 'int64', 'uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1176 + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float16, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1176, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L44_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1176, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L44_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1177 + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + */ + __pyx_v_dtcheck = CAFE_FLOAT; + + /* "PyCafeDefs.pxi":1176 + * elif dt in ['np.float_', 'np.float64', 'np.long', 'np.ulong', 'np.int64', 'np.uint64']: + * dtcheck = CAFE_DOUBLE + * elif dt in ['float16', 'float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1178 + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1178, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L46_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1178, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L46_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1179 + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + */ + __pyx_v_dtcheck = CAFE_FLOAT; + + /* "PyCafeDefs.pxi":1178 + * elif dt in ['float16', 'float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['np.float16', 'np.float32']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1180 + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_string, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_str, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_unicode, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_string_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_str_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_unicode_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1180, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L48_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1181 + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING # <<<<<<<<<<<<<< + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + */ + __pyx_v_dtcheck = CAFE_STRING; + + /* "PyCafeDefs.pxi":1180 + * elif dt in ['np.float16', 'np.float32']: + * dtcheck = CAFE_FLOAT + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1182 + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_string, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_str, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_unicode, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_string_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_str_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_np_unicode_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 1182, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + __pyx_L54_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":1183 + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING # <<<<<<<<<<<<<< + * elif dt in ['native', '']: + * dtcheck = dtn # need a line here + */ + __pyx_v_dtcheck = CAFE_STRING; + + /* "PyCafeDefs.pxi":1182 + * elif dt in ['string', 'str', 'unicode', 'string_', 'str_', 'unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: # <<<<<<<<<<<<<< + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1184 + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: # <<<<<<<<<<<<<< + * dtcheck = dtn # need a line here + * else: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_native, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1184, __pyx_L1_error) + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__5, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 1184, __pyx_L1_error) + __pyx_t_3 = __pyx_t_4; + __pyx_L60_bool_binop_done:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":1185 + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: + * dtcheck = dtn # need a line here # <<<<<<<<<<<<<< + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_dtn); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1185, __pyx_L1_error) + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1184 + * elif dt in ['np.string', 'np.str', 'np.unicode', 'np.string_', 'np.str_', 'np.unicode_']: + * dtcheck = CAFE_STRING + * elif dt in ['native', '']: # <<<<<<<<<<<<<< + * dtcheck = dtn # need a line here + * else: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1187 + * dtcheck = dtn # need a line here + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") # <<<<<<<<<<<<<< + * print("Data to be presented in native data type") + * + */ + /*else*/ { + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1188 + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + * print("Data to be presented in native data type") # <<<<<<<<<<<<<< + * + * return dtcheck + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1190 + * print("Data to be presented in native data type") + * + * return dtcheck # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1149 + * + * ################################################################################## + * cdef getMatchedDataType(dt, dtn): # <<<<<<<<<<<<<< + * # dt: input from user + * # dtn: native type + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.getMatchedDataType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1202 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ + +static struct __pyx_obj_6PyCafe_pvdata *__pyx_f_6PyCafe_PVDataHolderToStruct(PVDataHolder __pyx_v_pvd, struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct *__pyx_optional_args) { + PyObject *__pyx_v_dt = ((PyObject *)Py_None); + CAFEDataTypeCode __pyx_v_cdt; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localList = 0; + PyObject *__pyx_v_bytesVal = 0; + long __pyx_v_i; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_v_ll = 0; + PyObject *__pyx_v_ld = 0; + struct __pyx_obj_6PyCafe_pvdata *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + long __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("PVDataHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1206 + * cdef CAFEDataTypeCode cdt + * #global p1 + * cdef pvdata p1 = pvdata() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn = pvd.getDataType() + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_p1 = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1208 + * cdef pvdata p1 = pvdata() + * + * cdef unsigned int dtn = pvd.getDataType() # <<<<<<<<<<<<<< + * cdef unsigned int dtcheck = dtn + * cdef localList = [] + */ + __pyx_v_dtn = __pyx_v_pvd.getDataType(); + + /* "PyCafeDefs.pxi":1209 + * + * cdef unsigned int dtn = pvd.getDataType() + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * cdef localList = [] + * + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1210 + * cdef unsigned int dtn = pvd.getDataType() + * cdef unsigned int dtcheck = dtn + * cdef localList = [] # <<<<<<<<<<<<<< + * + * cdef bytes bytesVal + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1214 + * cdef bytes bytesVal + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1214, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1215 + * + * if dt: + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if dtcheck == CAFE_STRING: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1214 + * cdef bytes bytesVal + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1217 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * bytesVal = pvd.getAsString(i) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafeDefs.pxi":1218 + * + * if dtcheck == CAFE_STRING: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * bytesVal = pvd.getAsString(i) + * encoding = False + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1219 + * if dtcheck == CAFE_STRING: + * for i in range(0, pvd.getNelem()): + * bytesVal = pvd.getAsString(i) # <<<<<<<<<<<<<< + * encoding = False + * #if not encoding: + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_pvd.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1220 + * for i in range(0, pvd.getNelem()): + * bytesVal = pvd.getAsString(i) + * encoding = False # <<<<<<<<<<<<<< + * #if not encoding: + * # try: + */ + __pyx_v_encoding = 0; + + /* "PyCafeDefs.pxi":1227 + * # except UnicodeDecodeError: + * # pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1228 + * # pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafeDefs.pxi":1229 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * #print('utf-8 for umlauts CONFIRMED!') + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1229, __pyx_L7_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1229, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1230 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * #print('utf-8 for umlauts CONFIRMED!') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1228 + * # pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L14_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1232 + * encoding = True + * #print('utf-8 for umlauts CONFIRMED!') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + __pyx_L9_except_error:; + + /* "PyCafeDefs.pxi":1228 + * # pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L14_try_end:; + } + + /* "PyCafeDefs.pxi":1227 + * # except UnicodeDecodeError: + * # pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafeDefs.pxi":1234 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1235 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "PyCafeDefs.pxi":1236 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * #print('utf-16 for umlauts') + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1236, __pyx_L16_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1236, __pyx_L16_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1237 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * #print('utf-16 for umlauts') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1235 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L23_try_end; + __pyx_L16_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1239 + * encoding = True + * #print('utf-16 for umlauts') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L17_exception_handled; + } + goto __pyx_L18_except_error; + __pyx_L18_except_error:; + + /* "PyCafeDefs.pxi":1235 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L17_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + __pyx_L23_try_end:; + } + + /* "PyCafeDefs.pxi":1234 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafeDefs.pxi":1241 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal= (bytesVal).decode('latin-1') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1242 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafeDefs.pxi":1243 + * if not encoding: + * try: + * strVal= (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * #print('latin1 for umlauts') + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1243, __pyx_L25_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1243, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1244 + * try: + * strVal= (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * #print('latin1 for umlauts') + * except UnicodeDecodeError: + */ + __pyx_v_encoding = 1; + + /* "PyCafeDefs.pxi":1242 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L32_try_end; + __pyx_L25_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1246 + * encoding = True + * #print('latin1 for umlauts') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L26_exception_handled; + } + goto __pyx_L27_except_error; + __pyx_L27_except_error:; + + /* "PyCafeDefs.pxi":1242 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L26_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L32_try_end:; + } + + /* "PyCafeDefs.pxi":1241 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal= (bytesVal).decode('latin-1') + */ + } + + /* "PyCafeDefs.pxi":1248 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd.getAsString(i) + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1249 + * pass + * if not encoding: + * strVal = pvd.getAsString(i) # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvd.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1248 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd.getAsString(i) + * + */ + } + + /* "PyCafeDefs.pxi":1251 + * strVal = pvd.getAsString(i) + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_SHORT: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(2, 1251, __pyx_L1_error) } + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1251, __pyx_L1_error) + } + + /* "PyCafeDefs.pxi":1217 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * bytesVal = pvd.getAsString(i) + */ + break; + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1254 + * + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1255 + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1253 + * localList.append(strVal) + * + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + */ + break; + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1257 + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1258 + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvd.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1258, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1256 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + */ + break; + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1262 + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsString(i)) + * # else: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1263 + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) # <<<<<<<<<<<<<< + * # else: + * # for i in range(0, pvd.getNelem()): + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvd.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1259 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + */ + break; + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1268 + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1270 + * for i in range(0, pvd.getNelem()): + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1267 + * # for i in range(0, pvd.getNelem()): + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * # pvd.getAsChar(i) + */ + break; + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1272 + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1273 + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1271 + * # pvd.getAsChar(i) + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1275 + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvd.getAsDouble(i)) + * else: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1276 + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvd.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1276, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":1274 + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsDouble(i)) + */ + break; + default: + + /* "PyCafeDefs.pxi":1278 + * localList.append(pvd.getAsDouble(i)) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + */ + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1278, __pyx_L1_error) + break; + } + + /* "PyCafeDefs.pxi":1282 + * # print ("No Data! Error. Is channel connected?" + * + * p1.value = localList # <<<<<<<<<<<<<< + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() + */ + if (!(likely(PyList_CheckExact(__pyx_v_localList))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_localList)->tp_name), 0))) __PYX_ERR(2, 1282, __pyx_L1_error) + __pyx_t_1 = __pyx_v_localList; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1283 + * + * p1.value = localList + * p1.status = pvd.getStatus() # <<<<<<<<<<<<<< + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() + */ + __pyx_v_p1->status = __pyx_v_pvd.getStatus(); + + /* "PyCafeDefs.pxi":1284 + * p1.value = localList + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() # <<<<<<<<<<<<<< + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() + */ + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getStatusAsString()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->statusAsString); + __Pyx_DECREF(__pyx_v_p1->statusAsString); + __pyx_v_p1->statusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1285 + * p1.status = pvd.getStatus() + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() # <<<<<<<<<<<<<< + * p1.alarmStatus = pvd.getAlarmStatus() + * p1.alarmSeverity = pvd.getAlarmSeverity() + */ + __pyx_v_p1->nelem = __pyx_v_pvd.getNelem(); + + /* "PyCafeDefs.pxi":1286 + * p1.statusAsString = pvd.getStatusAsString() + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity = pvd.getAlarmSeverity() + * + */ + __pyx_v_p1->alarmStatus = __pyx_v_pvd.getAlarmStatus(); + + /* "PyCafeDefs.pxi":1287 + * p1.nelem = pvd.getNelem() + * p1.alarmStatus = pvd.getAlarmStatus() + * p1.alarmSeverity = pvd.getAlarmSeverity() # <<<<<<<<<<<<<< + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + */ + __pyx_v_p1->alarmSeverity = __pyx_v_pvd.getAlarmSeverity(); + + /* "PyCafeDefs.pxi":1289 + * p1.alarmSeverity = pvd.getAlarmSeverity() + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() # <<<<<<<<<<<<<< + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + * + */ + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getAlarmStatusAsString()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->alarmStatusAsString); + __Pyx_DECREF(__pyx_v_p1->alarmStatusAsString); + __pyx_v_p1->alarmStatusAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1290 + * + * p1.alarmStatusAsString = pvd.getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() # <<<<<<<<<<<<<< + * + * p1.pulseID = pvd.getPulseID() + */ + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pvd.getAlarmSeverityAsString()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->alarmSeverityAsString); + __Pyx_DECREF(__pyx_v_p1->alarmSeverityAsString); + __pyx_v_p1->alarmSeverityAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1292 + * p1.alarmSeverityAsString = pvd.getAlarmSeverityAsString() + * + * p1.pulseID = pvd.getPulseID() # <<<<<<<<<<<<<< + * + * p1.dataType = pvd.getDataType() + */ + __pyx_v_p1->pulseID = __pyx_v_pvd.getPulseID(); + + /* "PyCafeDefs.pxi":1294 + * p1.pulseID = pvd.getPulseID() + * + * p1.dataType = pvd.getDataType() # <<<<<<<<<<<<<< + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * + */ + __pyx_v_p1->dataType = __pyx_v_pvd.getDataType(); + + /* "PyCafeDefs.pxi":1295 + * + * p1.dataType = pvd.getDataType() + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) # <<<<<<<<<<<<<< + * + * p1.tsDateAsString = encodeString( pvd.getEpicsTimeStampAsString()) + */ + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cdt.message(__pyx_v_pvd.getDataType())); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->dataTypeAsString); + __Pyx_DECREF(__pyx_v_p1->dataTypeAsString); + __pyx_v_p1->dataTypeAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1297 + * p1.dataTypeAsString = cdt.message(pvd.getDataType()) + * + * p1.tsDateAsString = encodeString( pvd.getEpicsTimeStampAsString()) # <<<<<<<<<<<<<< + * p1.bsDateAsString = encodeString( pvd.getBSTimeStampAsString()) + * + */ + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_pvd.getEpicsTimeStampAsString()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_6PyCafe_encodeString(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 1297, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_p1->tsDateAsString); + __Pyx_DECREF(__pyx_v_p1->tsDateAsString); + __pyx_v_p1->tsDateAsString = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1298 + * + * p1.tsDateAsString = encodeString( pvd.getEpicsTimeStampAsString()) + * p1.bsDateAsString = encodeString( pvd.getBSTimeStampAsString()) # <<<<<<<<<<<<<< + * + * #Mr 21, 2002 11:59:11.856568682 + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_pvd.getBSTimeStampAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_f_6PyCafe_encodeString(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 1298, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->bsDateAsString); + __Pyx_DECREF(__pyx_v_p1->bsDateAsString); + __pyx_v_p1->bsDateAsString = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1302 + * #Mr 21, 2002 11:59:11.856568682 + * #print( p1.tsDateAsString, "//", p1.bsDateAsString) + * pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * cdef ll = [] + */ + __pyx_v_pvd._etsNorm = __pyx_v_pvd.getEpicsTimeStampAsUInt32(); + + /* "PyCafeDefs.pxi":1304 + * pvd._etsNorm = pvd.getEpicsTimeStampAsUInt32() + * + * cdef ll = [] # <<<<<<<<<<<<<< + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ll = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1305 + * + * cdef ll = [] + * ll.append((pvd._etsNorm).secPastEpoch) # <<<<<<<<<<<<<< + * ll.append((pvd._etsNorm).nsec) + * p1.ts = ll + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvd._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1306 + * cdef ll = [] + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) # <<<<<<<<<<<<<< + * p1.ts = ll + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvd._etsNorm.nsec); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1307 + * ll.append((pvd._etsNorm).secPastEpoch) + * ll.append((pvd._etsNorm).nsec) + * p1.ts = ll # <<<<<<<<<<<<<< + * + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() + */ + if (!(likely(PyList_CheckExact(__pyx_v_ll))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ll)->tp_name), 0))) __PYX_ERR(2, 1307, __pyx_L1_error) + __pyx_t_1 = __pyx_v_ll; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1309 + * p1.ts = ll + * + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * cdef ld = [] + */ + __pyx_v_pvd._etsDate = __pyx_v_pvd.getEpicsTimeStampAsDate(); + + /* "PyCafeDefs.pxi":1311 + * pvd._etsDate = pvd.getEpicsTimeStampAsDate() + * + * cdef ld = [] # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ld = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1312 + * + * cdef ld = [] + * ld.append((pvd._etsDate).year) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.year); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1313 + * cdef ld = [] + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.mon); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1313, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1314 + * ld.append((pvd._etsDate).year) + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.day); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1314, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1315 + * ld.append((pvd._etsDate).mon) + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1316 + * ld.append((pvd._etsDate).day) + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.min); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1316, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1317 + * ld.append((pvd._etsDate).hour) + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) # <<<<<<<<<<<<<< + * ld.append((pvd._etsDate).nsec) + * p1.tsDate = ld + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pvd._etsDate.sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1318 + * ld.append((pvd._etsDate).min) + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) # <<<<<<<<<<<<<< + * p1.tsDate = ld + * + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_pvd._etsDate.nsec); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 1318, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1319 + * ld.append((pvd._etsDate).sec) + * ld.append((pvd._etsDate).nsec) + * p1.tsDate = ld # <<<<<<<<<<<<<< + * + * return p1 + */ + if (!(likely(PyList_CheckExact(__pyx_v_ld))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_ld)->tp_name), 0))) __PYX_ERR(2, 1319, __pyx_L1_error) + __pyx_t_1 = __pyx_v_ld; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1321 + * p1.tsDate = ld + * + * return p1 # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_p1)); + __pyx_r = __pyx_v_p1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1202 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * cdef CAFEDataTypeCode cdt + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_pvdata *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.PVDataHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1327 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ + +static struct __pyx_obj_6PyCafe_pvctrl *__pyx_f_6PyCafe_PVCtrlHolderToStruct(PVCtrlHolder __pyx_v_pvc, struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct *__pyx_optional_args) { + PyObject *__pyx_v_dt = ((PyObject *)Py_None); + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_c1 = 0; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_bytesVal = 0; + PyObject *__pyx_v_localList = 0; + long __pyx_v_i; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_v_enumList = NULL; + PyObject *__pyx_v_bVal = 0; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + long __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + short __pyx_t_14; + short __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + __Pyx_RefNannySetupContext("PVCtrlHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1330 + * + * #global c1 + * cdef pvctrl c1 = pvctrl() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn = pvc.getDataType() + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvctrl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_c1 = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1332 + * cdef pvctrl c1 = pvctrl() + * + * cdef unsigned int dtn = pvc.getDataType() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtn + */ + __pyx_v_dtn = __pyx_v_pvc.getDataType(); + + /* "PyCafeDefs.pxi":1334 + * cdef unsigned int dtn = pvc.getDataType() + * + * cdef unsigned int dtcheck = dtn # <<<<<<<<<<<<<< + * cdef bytes bytesVal + * + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1337 + * cdef bytes bytesVal + * + * cdef localList = [] # <<<<<<<<<<<<<< + * + * if dt: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1339 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 1339, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1340 + * + * if dt: + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if dtcheck == CAFE_STRING: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1339 + * cdef localList = [] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1342 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafeDefs.pxi":1343 + * + * if dtcheck == CAFE_STRING: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * bytesVal = pvc.getAsString(i) + * try: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1344 + * if dtcheck == CAFE_STRING: + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_pvc.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1345 + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafeDefs.pxi":1346 + * bytesVal = pvc.getAsString(i) + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1346, __pyx_L6_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1346, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1345 + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L13_try_end; + __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1347 + * try: + * strVal = (bytesVal).decode('utf-8') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * try: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L7_exception_handled; + } + goto __pyx_L8_except_error; + __pyx_L8_except_error:; + + /* "PyCafeDefs.pxi":1345 + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L7_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L13_try_end:; + } + + /* "PyCafeDefs.pxi":1349 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "PyCafeDefs.pxi":1350 + * pass + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1350, __pyx_L14_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1350, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1349 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L21_try_end; + __pyx_L14_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1351 + * try: + * strVal = (bytesVal).decode('utf-16') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * try: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L15_exception_handled; + } + goto __pyx_L16_except_error; + __pyx_L16_except_error:; + + /* "PyCafeDefs.pxi":1349 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L15_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + __pyx_L21_try_end:; + } + + /* "PyCafeDefs.pxi":1353 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafeDefs.pxi":1354 + * pass + * try: + * strVal= (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * strVal = pvc.getAsString(i) + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1354, __pyx_L22_error) + } + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1354, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1353 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L29_try_end; + __pyx_L22_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1355 + * try: + * strVal= (bytesVal).decode('latin-1') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * strVal = pvc.getAsString(i) + * localList.append(strVal) + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_AddTraceback("PyCafe.PVCtrlHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_11) < 0) __PYX_ERR(2, 1355, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_11); + + /* "PyCafeDefs.pxi":1356 + * strVal= (bytesVal).decode('latin-1') + * except UnicodeDecodeError: + * strVal = pvc.getAsString(i) # <<<<<<<<<<<<<< + * localList.append(strVal) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_12 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvc.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1356, __pyx_L24_except_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_12); + __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L23_exception_handled; + } + goto __pyx_L24_except_error; + __pyx_L24_except_error:; + + /* "PyCafeDefs.pxi":1353 + * except UnicodeDecodeError: + * pass + * try: # <<<<<<<<<<<<<< + * strVal= (bytesVal).decode('latin-1') + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L23_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __pyx_L29_try_end:; + } + + /* "PyCafeDefs.pxi":1357 + * except UnicodeDecodeError: + * strVal = pvc.getAsString(i) + * localList.append(strVal) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1357, __pyx_L1_error) + } + + /* "PyCafeDefs.pxi":1342 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * bytesVal = pvc.getAsString(i) + */ + break; + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1359 + * localList.append(strVal) + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1360 + * elif dtcheck == CAFE_SHORT: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1360, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1358 + * strVal = pvc.getAsString(i) + * localList.append(strVal) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + */ + break; + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1362 + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1363 + * elif dtcheck == CAFE_FLOAT: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pvc.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1361 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # getAsShort(i) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + */ + break; + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1367 + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsString(i)) + * # else: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1368 + * # if self._c_cafe.isEnum(handle)==1: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) # <<<<<<<<<<<<<< + * # else: + * # for i in range(0, pvd.getNelem()): + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvc.getAsString(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1364 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # getAsFloat(i) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * # if self._c_cafe.isEnum(handle)==1: + */ + break; + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1373 + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1375 + * for i in range(0, pvc.getNelem()): + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1372 + * # for i in range(0, pvd.getNelem()): + * # localList.append(pvd.getAsLong(i)) #getAsUShort(i) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * # pvd.getAsChar(i) + */ + break; + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1377 + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1378 + * elif dtcheck == CAFE_LONG: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): + */ + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1376 + * # pvd.getAsChar(i) + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1380 + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): # <<<<<<<<<<<<<< + * localList.append(pvc.getAsDouble(i)) + * else: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1381 + * elif dtcheck == CAFE_DOUBLE: + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pvc.getAsDouble(__pyx_v_i)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1379 + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsLong(i)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsDouble(i)) + */ + break; + default: + + /* "PyCafeDefs.pxi":1383 + * localList.append(pvc.getAsDouble(i)) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + */ + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1383, __pyx_L1_error) + break; + } + + /* "PyCafeDefs.pxi":1386 + * # print ("This line in PyCafe def getDataHolderToStruct should never appear!" + * # print ("No Data! Error. Is channel connected?" + * c1.value = localList # <<<<<<<<<<<<<< + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() + */ + if (!(likely(PyList_CheckExact(__pyx_v_localList))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_localList)->tp_name), 0))) __PYX_ERR(2, 1386, __pyx_L1_error) + __pyx_t_11 = __pyx_v_localList; + __Pyx_INCREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_v_c1->value); + __Pyx_DECREF(__pyx_v_c1->value); + __pyx_v_c1->value = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafeDefs.pxi":1387 + * # print ("No Data! Error. Is channel connected?" + * c1.value = localList + * c1.status = pvc.getStatus() # <<<<<<<<<<<<<< + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() + */ + __pyx_v_c1->status = __pyx_v_pvc.getStatus(); + + /* "PyCafeDefs.pxi":1388 + * c1.value = localList + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() # <<<<<<<<<<<<<< + * c1.alarmStatus = pvc.getAlarmStatus() + * c1.alarmSeverity = pvc.getAlarmSeverity() + */ + __pyx_v_c1->nelem = __pyx_v_pvc.getNelem(); + + /* "PyCafeDefs.pxi":1389 + * c1.status = pvc.getStatus() + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() # <<<<<<<<<<<<<< + * c1.alarmSeverity = pvc.getAlarmSeverity() + * + */ + __pyx_v_c1->alarmStatus = __pyx_v_pvc.getAlarmStatus(); + + /* "PyCafeDefs.pxi":1390 + * c1.nelem = pvc.getNelem() + * c1.alarmStatus = pvc.getAlarmStatus() + * c1.alarmSeverity = pvc.getAlarmSeverity() # <<<<<<<<<<<<<< + * + * c1.precision = pvc.getPrecision() + */ + __pyx_v_c1->alarmSeverity = __pyx_v_pvc.getAlarmSeverity(); + + /* "PyCafeDefs.pxi":1392 + * c1.alarmSeverity = pvc.getAlarmSeverity() + * + * c1.precision = pvc.getPrecision() # <<<<<<<<<<<<<< + * c1.noEnumStrings = pvc.getNoEnumStrings() + * + */ + __pyx_v_c1->precision = __pyx_v_pvc.getPrecision(); + + /* "PyCafeDefs.pxi":1393 + * + * c1.precision = pvc.getPrecision() + * c1.noEnumStrings = pvc.getNoEnumStrings() # <<<<<<<<<<<<<< + * + * enumList = [] + */ + __pyx_v_c1->noEnumStrings = __pyx_v_pvc.getNoEnumStrings(); + + /* "PyCafeDefs.pxi":1395 + * c1.noEnumStrings = pvc.getNoEnumStrings() + * + * enumList = [] # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNoEnumStrings()): + * enumList.append(pvc.getEnumStrings()[i]) + */ + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_v_enumList = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafeDefs.pxi":1396 + * + * enumList = [] + * for i in range(0, pvc.getNoEnumStrings()): # <<<<<<<<<<<<<< + * enumList.append(pvc.getEnumStrings()[i]) + * + */ + __pyx_t_14 = __pyx_v_pvc.getNoEnumStrings(); + __pyx_t_15 = __pyx_t_14; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_15; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":1397 + * enumList = [] + * for i in range(0, pvc.getNoEnumStrings()): + * enumList.append(pvc.getEnumStrings()[i]) # <<<<<<<<<<<<<< + * + * c1.enumStrings = enumList + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvc.getEnumStrings()[__pyx_v_i])); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_enumList, __pyx_t_11); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(2, 1397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafeDefs.pxi":1399 + * enumList.append(pvc.getEnumStrings()[i]) + * + * c1.enumStrings = enumList # <<<<<<<<<<<<<< + * + * cdef bytes bVal + */ + __Pyx_INCREF(__pyx_v_enumList); + __Pyx_GIVEREF(__pyx_v_enumList); + __Pyx_GOTREF(__pyx_v_c1->enumStrings); + __Pyx_DECREF(__pyx_v_c1->enumStrings); + __pyx_v_c1->enumStrings = __pyx_v_enumList; + + /* "PyCafeDefs.pxi":1402 + * + * cdef bytes bVal + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "PyCafeDefs.pxi":1403 + * cdef bytes bVal + * try: + * c1.units = pvc.getUnits() # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * #c1.units = str("") + */ + __pyx_t_11 = __Pyx_PyUnicode_FromString(__pyx_v_pvc.getUnits()); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1403, __pyx_L46_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_v_c1->units); + __Pyx_DECREF(__pyx_v_c1->units); + __pyx_v_c1->units = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafeDefs.pxi":1402 + * + * cdef bytes bVal + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L51_try_end; + __pyx_L46_error:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafeDefs.pxi":1404 + * try: + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * #c1.units = str("") + * + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_10) { + __Pyx_AddTraceback("PyCafe.PVCtrlHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(2, 1404, __pyx_L48_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafeDefs.pxi":1407 + * #c1.units = str("") + * + * bVal = pvc.getUnits() # <<<<<<<<<<<<<< + * c1.units = (bVal).decode('latin-1') + * + */ + __pyx_t_12 = __Pyx_PyBytes_FromString(__pyx_v_pvc.getUnits()); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 1407, __pyx_L48_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_16 = __pyx_t_12; + __Pyx_INCREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_v_bVal = ((PyObject*)__pyx_t_16); + __pyx_t_16 = 0; + + /* "PyCafeDefs.pxi":1408 + * + * bVal = pvc.getUnits() + * c1.units = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * + * ''' + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(2, 1408, __pyx_L48_except_error) + } + __pyx_t_16 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1408, __pyx_L48_except_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GIVEREF(__pyx_t_16); + __Pyx_GOTREF(__pyx_v_c1->units); + __Pyx_DECREF(__pyx_v_c1->units); + __pyx_v_c1->units = ((PyObject*)__pyx_t_16); + __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L47_exception_handled; + } + goto __pyx_L48_except_error; + __pyx_L48_except_error:; + + /* "PyCafeDefs.pxi":1402 + * + * cdef bytes bVal + * try: # <<<<<<<<<<<<<< + * c1.units = pvc.getUnits() + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L47_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + __pyx_L51_try_end:; + } + + /* "PyCafeDefs.pxi":1422 + * ''' + * + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getUpperDispLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->upperDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->upperDisplayLimit); + __pyx_v_c1->upperDisplayLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1423 + * + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getLowerDispLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->lowerDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->lowerDisplayLimit); + __pyx_v_c1->lowerDisplayLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1424 + * c1.upperDisplayLimit = pvc.getUpperDispLimit_AsDouble() + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getUpperAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->upperAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->upperAlarmLimit); + __pyx_v_c1->upperAlarmLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1425 + * c1.lowerDisplayLimit = pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getUpperWarningLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->upperWarningLimit); + __Pyx_DECREF(__pyx_v_c1->upperWarningLimit); + __pyx_v_c1->upperWarningLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1426 + * c1.upperAlarmLimit = pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getLowerWarningLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->lowerWarningLimit); + __Pyx_DECREF(__pyx_v_c1->lowerWarningLimit); + __pyx_v_c1->lowerWarningLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1427 + * c1.upperWarningLimit = pvc.getUpperWarningLimit_AsDouble() + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getLowerAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->lowerAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->lowerAlarmLimit); + __pyx_v_c1->lowerAlarmLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1428 + * c1.lowerWarningLimit = pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + * + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getUpperCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->upperControlLimit); + __Pyx_DECREF(__pyx_v_c1->upperControlLimit); + __pyx_v_c1->upperControlLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1429 + * c1.lowerAlarmLimit = pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit = pvc.getUpperCtrlLimit_AsDouble() + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * + * return c1 + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_pvc.getLowerCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_c1->lowerControlLimit); + __Pyx_DECREF(__pyx_v_c1->lowerControlLimit); + __pyx_v_c1->lowerControlLimit = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1431 + * c1.lowerControlLimit = pvc.getLowerCtrlLimit_AsDouble() + * + * return c1 # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_c1)); + __pyx_r = __pyx_v_c1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1327 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_pvctrl *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.PVCtrlHolderToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c1); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_enumList); + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":1437 + * ################################################################################# + * + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): # <<<<<<<<<<<<<< + * + * cdef channelInfo ci = channelInfo() + */ + +static struct __pyx_obj_6PyCafe_channelInfo *__pyx_f_6PyCafe_channelRegaliaToStruct(ChannelRegalia __pyx_v_cr) { + struct __pyx_obj_6PyCafe_channelInfo *__pyx_v_ci = 0; + CAFEDataTypeCode __pyx_v_cdt; + struct __pyx_obj_6PyCafe_channelInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("channelRegaliaToStruct", 0); + + /* "PyCafeDefs.pxi":1439 + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): + * + * cdef channelInfo ci = channelInfo() # <<<<<<<<<<<<<< + * cdef CAFEDataTypeCode cdt + * + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_channelInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ci = ((struct __pyx_obj_6PyCafe_channelInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1442 + * cdef CAFEDataTypeCode cdt + * + * ci.channelID = ( < long > cr.getChannelID()) # <<<<<<<<<<<<<< + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() + */ + __pyx_v_ci->channelID = ((long)__pyx_v_cr.getChannelID()); + + /* "PyCafeDefs.pxi":1443 + * + * ci.channelID = ( < long > cr.getChannelID()) + * ci.connectFlag = cr.getConnectFlag() # <<<<<<<<<<<<<< + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() + */ + __pyx_v_ci->connectFlag = __pyx_v_cr.getConnectFlag(); + + /* "PyCafeDefs.pxi":1444 + * ci.channelID = ( < long > cr.getChannelID()) + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() # <<<<<<<<<<<<<< + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + */ + __pyx_v_ci->hostName = __pyx_v_cr.getHostNameAsString(); + + /* "PyCafeDefs.pxi":1445 + * ci.connectFlag = cr.getConnectFlag() + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() # <<<<<<<<<<<<<< + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() + */ + __pyx_v_ci->dataType = __pyx_v_cr.getDataType(); + + /* "PyCafeDefs.pxi":1446 + * ci.hostName = cr.getHostNameAsString() + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) # <<<<<<<<<<<<<< + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() + */ + __pyx_v_ci->dataTypeAsString = __pyx_v_cdt.message(__pyx_v_cr.getDataType()); + + /* "PyCafeDefs.pxi":1447 + * ci.dataType = cr.getDataType() + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() # <<<<<<<<<<<<<< + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() + */ + __pyx_v_ci->className = __pyx_v_cr.getClassNameAsString(); + + /* "PyCafeDefs.pxi":1448 + * ci.dataTypeAsString = cdt.message(cr.getDataType()) + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() # <<<<<<<<<<<<<< + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() + */ + __pyx_v_ci->accessRead = __pyx_v_cr.getAccessRead(); + + /* "PyCafeDefs.pxi":1449 + * ci.className = cr.getClassNameAsString() + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() # <<<<<<<<<<<<<< + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() + */ + __pyx_v_ci->accessWrite = __pyx_v_cr.getAccessWrite(); + + /* "PyCafeDefs.pxi":1450 + * ci.accessRead = cr.getAccessRead() + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() # <<<<<<<<<<<<<< + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() + */ + __pyx_v_ci->nelem = __pyx_v_cr.getNelem(); + + /* "PyCafeDefs.pxi":1451 + * ci.accessWrite = cr.getAccessWrite() + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() # <<<<<<<<<<<<<< + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() + */ + __pyx_v_ci->connectionState = __pyx_v_cr.getConnectionState(); + + /* "PyCafeDefs.pxi":1452 + * ci.nelem = cr.getNelem() + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() # <<<<<<<<<<<<<< + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + */ + __pyx_v_ci->cafeConnectionState = __pyx_v_cr.getCafeConnectionState(); + + /* "PyCafeDefs.pxi":1453 + * ci.connectionState = cr.getConnectionState() + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() # <<<<<<<<<<<<<< + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + * return ci + */ + __pyx_v_ci->connectionStateAsString = __pyx_v_cr.getConnectionStateAsString(); + + /* "PyCafeDefs.pxi":1454 + * ci.cafeConnectionState = cr.getCafeConnectionState() + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() # <<<<<<<<<<<<<< + * return ci + * ################################################################################# + */ + __pyx_v_ci->cafeConnectionStateAsString = __pyx_v_cr.getCafeConnectionStateAsString(); + + /* "PyCafeDefs.pxi":1455 + * ci.connectionStateAsString = cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString = cr.getCafeConnectionStateAsString() + * return ci # <<<<<<<<<<<<<< + * ################################################################################# + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_ci)); + __pyx_r = __pyx_v_ci; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1437 + * ################################################################################# + * + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): # <<<<<<<<<<<<<< + * + * cdef channelInfo ci = channelInfo() + */ + + /* function exit code */ + __pyx_r = ((struct __pyx_obj_6PyCafe_channelInfo *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.channelRegaliaToStruct", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_ci); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_1verify_handlepv(PyObject *__pyx_self, PyObject *__pyx_v_func); /*proto*/ +static char __pyx_doc_6PyCafe_verify_handlepv[] = "Decorator to validate handle/PV input argument.\n\n PyCafe methods that act on a single channel accept either the PV name or \n the handle (object reference) to the PV as returned by the ``open`` method. \n If a PV name is given, the decorator retrieves the associated handle to\n pass on to the underlying C++ CAFE method. \n\n Args:\n func: The function to be wrapped\n\n Returns:\n The modified input function \n \n Raises:\n TypeError: If handle/PV is not `int` or `str`, respectively.\n ValueError: If handle is invalid. \n\n "; +static PyMethodDef __pyx_mdef_6PyCafe_1verify_handlepv = {"verify_handlepv", (PyCFunction)__pyx_pw_6PyCafe_1verify_handlepv, METH_O, __pyx_doc_6PyCafe_verify_handlepv}; +static PyObject *__pyx_pw_6PyCafe_1verify_handlepv(PyObject *__pyx_self, PyObject *__pyx_v_func) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("verify_handlepv (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_verify_handlepv(__pyx_self, ((PyObject *)__pyx_v_func)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":110 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15verify_handlepv_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6PyCafe_15verify_handlepv_1wrapper = {"wrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_15verify_handlepv_1wrapper, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6PyCafe_15verify_handlepv_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("wrapper (wrapper)", 0); + __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + if (PyTuple_GET_SIZE(__pyx_args) > 1) { + __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_args)) { + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_args); + } else { + __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "wrapper") < 0)) __PYX_ERR(0, 110, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_self = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("wrapper", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 110, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; + __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; + __Pyx_AddTraceback("PyCafe.verify_handlepv.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_15verify_handlepv_wrapper(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15verify_handlepv_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_cur_scope; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_outer_scope; + PyObject *__pyx_v_handlePV = NULL; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + unsigned int __pyx_t_12; + __Pyx_RefNannySetupContext("wrapper", 0); + __pyx_outer_scope = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "PyCafe.pyx":115 + * #print('The keyword arguments are', kwargs) + * + * handlePV = args[0] # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * + */ + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handlePV = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":116 + * + * handlePV = args[0] + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":120 + * + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): # <<<<<<<<<<<<<< + * if len(handlePV) == 1: + * handlePV = handlePV[0] + */ + __pyx_t_2 = PyList_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":121 + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): + * if len(handlePV) == 1: # <<<<<<<<<<<<<< + * handlePV = handlePV[0] + * + */ + __pyx_t_4 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":122 + * if isinstance(handlePV, list): + * if len(handlePV) == 1: + * handlePV = handlePV[0] # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_handlePV, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_handlePV, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":121 + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): + * if len(handlePV) == 1: # <<<<<<<<<<<<<< + * handlePV = handlePV[0] + * + */ + } + + /* "PyCafe.pyx":120 + * + * #Accept if pv/handle is in list of length one + * if isinstance(handlePV, list): # <<<<<<<<<<<<<< + * if len(handlePV) == 1: + * handlePV = handlePV[0] + */ + } + + /* "PyCafe.pyx":124 + * handlePV = handlePV[0] + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * if handlePV < 0: + * raise ValueError( + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":125 + * + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_handlePV, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":127 + * if handlePV < 0: + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("A handle can never hold a negative value! "))) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":128 + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("A handle can never hold a negative value! "))) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_appname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 128, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_Exception_raised_in, __pyx_t_7, __pyx_t_8, __pyx_kp_u_A_handle_can_never_hold_a_negati}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_Exception_raised_in, __pyx_t_7, __pyx_t_8, __pyx_kp_u_A_handle_can_never_hold_a_negati}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_A_handle_can_never_hold_a_negati); + __Pyx_GIVEREF(__pyx_kp_u_A_handle_can_never_hold_a_negati); + PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_kp_u_A_handle_can_never_hold_a_negati); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":126 + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 126, __pyx_L1_error) + + /* "PyCafe.pyx":125 + * + * if isinstance(handlePV, (int, long)): + * if handlePV < 0: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + } + + /* "PyCafe.pyx":131 + * ("A handle can never hold a negative value! "))) + * + * handle = handlePV # <<<<<<<<<<<<<< + * + * if not self.isValid(handle): + */ + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_v_handle = __pyx_t_12; + + /* "PyCafe.pyx":133 + * handle = handlePV + * + * if not self.isValid(handle): # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isValid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":135 + * if not self.isValid(handle): + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("Invalid handle of type . If handle is not " + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":136 + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("Invalid handle of type . If handle is not " + * "known, \nsuggest using PV name of type " + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_appname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 136, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_kp_u_Exception_raised_in, __pyx_t_11, __pyx_t_8, __pyx_kp_u_Invalid_handle_of_type_class_int}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_kp_u_Exception_raised_in, __pyx_t_11, __pyx_t_8, __pyx_kp_u_Invalid_handle_of_type_class_int}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_Invalid_handle_of_type_class_int); + __Pyx_GIVEREF(__pyx_kp_u_Invalid_handle_of_type_class_int); + PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_kp_u_Invalid_handle_of_type_class_int); + __pyx_t_11 = 0; + __pyx_t_8 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":134 + * + * if not self.isValid(handle): + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 134, __pyx_L1_error) + + /* "PyCafe.pyx":133 + * handle = handlePV + * + * if not self.isValid(handle): # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {}.pyx: {} \n{}".format( + */ + } + + /* "PyCafe.pyx":124 + * handlePV = handlePV[0] + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * if handlePV < 0: + * raise ValueError( + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":141 + * "as input argument instead. "))) + * + * elif isinstance(handlePV, str): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":142 + * + * elif isinstance(handlePV, str): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_handle = __pyx_t_12; + + /* "PyCafe.pyx":141 + * "as input argument instead. "))) + * + * elif isinstance(handlePV, str): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":144 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + /*else*/ { + + /* "PyCafe.pyx":145 + * else: + * raise TypeError( + * "{} {}.pyx: {} \n{}".format( # <<<<<<<<<<<<<< + * "Exception raised in", _appname, func.__name__, + * ("First input argument, should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_pyx, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":146 + * raise TypeError( + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, # <<<<<<<<<<<<<< + * ("First input argument, should be of type " + * "if handle, else if PV"))) + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_appname); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 146, __pyx_L1_error) } + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_func, __pyx_n_s_name_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_kp_u_Exception_raised_in, __pyx_t_9, __pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_kp_u_Exception_raised_in, __pyx_t_9, __pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_kp_u_Exception_raised_in); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_10, __pyx_kp_u_First_input_argument_should_be_o); + __pyx_t_9 = 0; + __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":144 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "{} {}.pyx: {} \n{}".format( + * "Exception raised in", _appname, func.__name__, + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 144, __pyx_L1_error) + } + __pyx_L5:; + + /* "PyCafe.pyx":154 + * + * + * if not kwargs: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_3 = ((!__pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":155 + * + * if not kwargs: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle) + */ + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":157 + * if len(args) == 1: + * + * return func(self, handle) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 157, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func); + __pyx_t_7 = __pyx_cur_scope->__pyx_v_func; __pyx_t_8 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_t_1}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":155 + * + * if not kwargs: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle) + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":160 + * + * else: + * return func(self, handle, *args[1:]) # <<<<<<<<<<<<<< + * + * elif len(kwargs) > 0: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 160, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L11:; + + /* "PyCafe.pyx":154 + * + * + * if not kwargs: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + goto __pyx_L10; + } + + /* "PyCafe.pyx":162 + * return func(self, handle, *args[1:]) + * + * elif len(kwargs) > 0: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + __pyx_t_4 = PyDict_Size(__pyx_v_kwargs); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 > 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":163 + * + * elif len(kwargs) > 0: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle, **kwargs) + */ + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_4 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":165 + * if len(args) == 1: + * + * return func(self, handle, **kwargs) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 165, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_9, __pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":163 + * + * elif len(kwargs) > 0: + * if len(args) == 1: # <<<<<<<<<<<<<< + * + * return func(self, handle, **kwargs) + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":168 + * + * else: + * return func(self, handle, *args[1:], **kwargs) #dt=kwargs[kwargs_keys[0]]) # <<<<<<<<<<<<<< + * + * return wrapper + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 168, __pyx_L1_error) } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_t_7, __pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L12:; + + /* "PyCafe.pyx":162 + * return func(self, handle, *args[1:]) + * + * elif len(kwargs) > 0: # <<<<<<<<<<<<<< + * if len(args) == 1: + * + */ + } + __pyx_L10:; + + /* "PyCafe.pyx":110 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.verify_handlepv.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_handlePV); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + +static PyObject *__pyx_pf_6PyCafe_verify_handlepv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_cur_scope; + PyObject *__pyx_v_wrapper = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("verify_handlepv", 0); + __pyx_cur_scope = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(__pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 88, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_func = __pyx_v_func; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func); + + /* "PyCafe.pyx":110 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6PyCafe_15verify_handlepv_1wrapper, 0, __pyx_n_s_verify_handlepv_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_PyCafe, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_wrapper = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":170 + * return func(self, handle, *args[1:], **kwargs) #dt=kwargs[kwargs_keys[0]]) + * + * return wrapper # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_wrapper); + __pyx_r = __pyx_v_wrapper; + goto __pyx_L0; + + /* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.verify_handlepv", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_wrapper); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":209 + * + * ########################################################################### + * def __cinit__(self): # <<<<<<<<<<<<<< + * """Initializes CAFE and CyCafe class attributes. + * + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6CyCafe_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_6CyCafe_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe___cinit__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6CyCafe___cinit__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_e = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + CAFE *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafe.pyx":213 + * + * """ + * cdef str _METHOD = "__cinit__" # <<<<<<<<<<<<<< + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + */ + __Pyx_INCREF(__pyx_n_u_cinit); + __pyx_v__METHOD = __pyx_n_u_cinit; + + /* "PyCafe.pyx":214 + * """ + * cdef str _METHOD = "__cinit__" + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## # <<<<<<<<<<<<<< + * + * if self._c_cafe is NULL: + */ + try { + __pyx_t_1 = new CAFE(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 214, __pyx_L1_error) + } + __pyx_v_self->_c_cafe = __pyx_t_1; + + /* "PyCafe.pyx":216 + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError("Failed to instantiate CAFE()") + * + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe == NULL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":217 + * + * if self._c_cafe is NULL: + * raise MemoryError("Failed to instantiate CAFE()") # <<<<<<<<<<<<<< + * + * self.cs = self._c_cafe.getCafeStatus() + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 217, __pyx_L1_error) + + /* "PyCafe.pyx":216 + * self._c_cafe = new ccafe.CAFE() ##_c_cafe ## + * + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError("Failed to instantiate CAFE()") + * + */ + } + + /* "PyCafe.pyx":219 + * raise MemoryError("Failed to instantiate CAFE()") + * + * self.cs = self._c_cafe.getCafeStatus() # <<<<<<<<<<<<<< + * + * self._exception_text = "Exception raised in PyCafe.pyx:" + */ + __pyx_v_self->cs = __pyx_v_self->_c_cafe->getCafeStatus(); + + /* "PyCafe.pyx":221 + * self.cs = self._c_cafe.getCafeStatus() + * + * self._exception_text = "Exception raised in PyCafe.pyx:" # <<<<<<<<<<<<<< + * self._enable_exceptions = False + * + */ + __Pyx_INCREF(__pyx_kp_u_Exception_raised_in_PyCafe_pyx); + __Pyx_GIVEREF(__pyx_kp_u_Exception_raised_in_PyCafe_pyx); + __Pyx_GOTREF(__pyx_v_self->_exception_text); + __Pyx_DECREF(__pyx_v_self->_exception_text); + __pyx_v_self->_exception_text = __pyx_kp_u_Exception_raised_in_PyCafe_pyx; + + /* "PyCafe.pyx":222 + * + * self._exception_text = "Exception raised in PyCafe.pyx:" + * self._enable_exceptions = False # <<<<<<<<<<<<<< + * + * self._min_timeout = 0.001 #cannot be zero + */ + __pyx_v_self->_enable_exceptions = 0; + + /* "PyCafe.pyx":224 + * self._enable_exceptions = False + * + * self._min_timeout = 0.001 #cannot be zero # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v_self->_min_timeout = 0.001; + + /* "PyCafe.pyx":226 + * self._min_timeout = 0.001 #cannot be zero + * + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + { + (void)__pyx_t_4; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */ + /*try:*/ { + + /* "PyCafe.pyx":227 + * + * try: + * self._c_cafe.init() # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance(e.args, (tuple)): + */ + (void)(__pyx_v_self->_c_cafe->init()); + + /* "PyCafe.pyx":226 + * self._min_timeout = 0.001 #cannot be zero + * + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + } + } + + /* "PyCafe.pyx":241 + * + * + * print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_PY_VERSION_HEX_is); + __Pyx_GIVEREF(__pyx_kp_u_PY_VERSION_HEX_is); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_PY_VERSION_HEX_is); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":244 + * + * IF PY_EXT_C: + * print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS") # <<<<<<<<<<<<<< + * ELSE: + * print("USING API PyCafe_api.h INTERFACE FOR CALLBACKS") + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":209 + * + * ########################################################################### + * def __cinit__(self): # <<<<<<<<<<<<<< + * """Initializes CAFE and CyCafe class attributes. + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":254 + * + * ########################################################################### + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self._c_cafe + * + */ + +/* Python wrapper */ +static void __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_6PyCafe_6CyCafe_2__dealloc__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "PyCafe.pyx":255 + * ########################################################################### + * def __dealloc__(self): + * del self._c_cafe # <<<<<<<<<<<<<< + * + * ########################################################################### + */ + delete __pyx_v_self->_c_cafe; + + /* "PyCafe.pyx":254 + * + * ########################################################################### + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self._c_cafe + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafe.pyx":260 + * + * @verify_handlepv + * def get_wf_express(self, handlePV, nelem): # <<<<<<<<<<<<<< + * print("get_wf_express") + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5get_wf_express(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5get_wf_express(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_nelem = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_wf_express (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_nelem_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_wf_express", 1, 2, 2, 1); __PYX_ERR(0, 260, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_wf_express") < 0)) __PYX_ERR(0, 260, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_nelem = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_wf_express", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 260, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.get_wf_express", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_4get_wf_express(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_nelem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_4get_wf_express(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_nelem) { + dbr_char_t *__pyx_v_valCharArray; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_mvUInt8n = NULL; + PyObject *__pyx_v_ij = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("get_wf_express", 0); + + /* "PyCafe.pyx":261 + * @verify_handlepv + * def get_wf_express(self, handlePV, nelem): + * print("get_wf_express") # <<<<<<<<<<<<<< + * + * #''' + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":264 + * + * #''' + * valCharArray = malloc(nelem * sizeof(dbr_char_t)) # <<<<<<<<<<<<<< + * status = self._c_cafe.wfExpress(handlePV, nelem, valCharArray) + * #print("status", status, valCharArray[0]) + */ + __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(dbr_char_t))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Multiply(__pyx_v_nelem, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_valCharArray = ((dbr_char_t *)malloc(__pyx_t_3)); + + /* "PyCafe.pyx":265 + * #''' + * valCharArray = malloc(nelem * sizeof(dbr_char_t)) + * status = self._c_cafe.wfExpress(handlePV, nelem, valCharArray) # <<<<<<<<<<<<<< + * #print("status", status, valCharArray[0]) + * mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C') + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_v_nelem); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->wfExpress(__pyx_t_4, __pyx_t_5, __pyx_v_valCharArray); + + /* "PyCafe.pyx":267 + * status = self._c_cafe.wfExpress(handlePV, nelem, valCharArray) + * #print("status", status, valCharArray[0]) + * mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelem): + * mvUInt8n[ij] = valCharArray[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_nelem); + __Pyx_GIVEREF(__pyx_v_nelem); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_nelem); + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvUInt8n = __pyx_t_8; + __pyx_t_8 = 0; + + /* "PyCafe.pyx":268 + * #print("status", status, valCharArray[0]) + * mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C') + * for ij in range(0, nelem): # <<<<<<<<<<<<<< + * mvUInt8n[ij] = valCharArray[ij] + * free(valCharArray) + */ + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_0); + __Pyx_INCREF(__pyx_v_nelem); + __Pyx_GIVEREF(__pyx_v_nelem); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_nelem); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 268, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_8))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #endif + } + } else { + __pyx_t_6 = __pyx_t_10(__pyx_t_8); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 268, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_ij, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":269 + * mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C') + * for ij in range(0, nelem): + * mvUInt8n[ij] = valCharArray[ij] # <<<<<<<<<<<<<< + * free(valCharArray) + * + */ + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_ij); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_npy_uint8(((__pyx_t_5numpy_uint8_t)(__pyx_v_valCharArray[__pyx_t_11]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(PyObject_SetItem(__pyx_v_mvUInt8n, __pyx_v_ij, __pyx_t_6) < 0)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":268 + * #print("status", status, valCharArray[0]) + * mvUInt8n = np.empty(nelem, dtype=np.uint8, order='C') + * for ij in range(0, nelem): # <<<<<<<<<<<<<< + * mvUInt8n[ij] = valCharArray[ij] + * free(valCharArray) + */ + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":270 + * for ij in range(0, nelem): + * mvUInt8n[ij] = valCharArray[ij] + * free(valCharArray) # <<<<<<<<<<<<<< + * + * return mvUInt8n + */ + free(__pyx_v_valCharArray); + + /* "PyCafe.pyx":272 + * free(valCharArray) + * + * return mvUInt8n # <<<<<<<<<<<<<< + * #''' + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvUInt8n); + __pyx_r = __pyx_v_mvUInt8n; + goto __pyx_L0; + + /* "PyCafe.pyx":260 + * + * @verify_handlepv + * def get_wf_express(self, handlePV, nelem): # <<<<<<<<<<<<<< + * print("get_wf_express") + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.get_wf_express", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_mvUInt8n); + __Pyx_XDECREF(__pyx_v_ij); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":275 + * #''' + * + * def ca_version(self): # <<<<<<<<<<<<<< + * return self._c_cafe._ca_version() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7ca_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7ca_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_version (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_6ca_version(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_6ca_version(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("ca_version", 0); + + /* "PyCafe.pyx":276 + * + * def ca_version(self): + * return self._c_cafe._ca_version() # <<<<<<<<<<<<<< + * + * def epics_version_string(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->_c_cafe->_ca_version()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":275 + * #''' + * + * def ca_version(self): # <<<<<<<<<<<<<< + * return self._c_cafe._ca_version() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.ca_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":278 + * return self._c_cafe._ca_version() + * + * def epics_version_string(self): # <<<<<<<<<<<<<< + * return self._c_cafe._epics_version() + * def CAFE_version(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9epics_version_string(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9epics_version_string(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("epics_version_string (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_8epics_version_string(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8epics_version_string(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("epics_version_string", 0); + + /* "PyCafe.pyx":279 + * + * def epics_version_string(self): + * return self._c_cafe._epics_version() # <<<<<<<<<<<<<< + * def CAFE_version(self): + * return CAFE_VERSION + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->_c_cafe->_epics_version()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":278 + * return self._c_cafe._ca_version() + * + * def epics_version_string(self): # <<<<<<<<<<<<<< + * return self._c_cafe._epics_version() + * def CAFE_version(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.epics_version_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":280 + * def epics_version_string(self): + * return self._c_cafe._epics_version() + * def CAFE_version(self): # <<<<<<<<<<<<<< + * return CAFE_VERSION + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11CAFE_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11CAFE_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("CAFE_version (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_10CAFE_version(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10CAFE_version(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("CAFE_version", 0); + + /* "PyCafe.pyx":281 + * return self._c_cafe._epics_version() + * def CAFE_version(self): + * return CAFE_VERSION # <<<<<<<<<<<<<< + * + * def EPICS_version(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_kp_u_1_19_3_py37_gcc_7_3_0); + __pyx_r = __pyx_kp_u_1_19_3_py37_gcc_7_3_0; + goto __pyx_L0; + + /* "PyCafe.pyx":280 + * def epics_version_string(self): + * return self._c_cafe._epics_version() + * def CAFE_version(self): # <<<<<<<<<<<<<< + * return CAFE_VERSION + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":283 + * return CAFE_VERSION + * + * def EPICS_version(self): # <<<<<<<<<<<<<< + * return EPICS_VERSION + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13EPICS_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13EPICS_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("EPICS_version (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_12EPICS_version(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12EPICS_version(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("EPICS_version", 0); + + /* "PyCafe.pyx":284 + * + * def EPICS_version(self): + * return EPICS_VERSION # <<<<<<<<<<<<<< + * + * @verify_handlepv + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_kp_u_7_0_6); + __pyx_r = __pyx_kp_u_7_0_6; + goto __pyx_L0; + + /* "PyCafe.pyx":283 + * return CAFE_VERSION + * + * def EPICS_version(self): # <<<<<<<<<<<<<< + * return EPICS_VERSION + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":287 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15setPyConnectCallbackFn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15setPyConnectCallbackFn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setPyConnectCallbackFn (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPyConnectCallbackFn") < 0)) __PYX_ERR(0, 287, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setPyConnectCallbackFn", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 287, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPyConnectCallbackFn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_14setPyConnectCallbackFn(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14setPyConnectCallbackFn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + CYTHON_UNUSED PyObject *__pyx_v_pv_name = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + unsigned int __pyx_t_3; + __Pyx_RefNannySetupContext("setPyConnectCallbackFn", 0); + + /* "PyCafe.pyx":288 + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: # <<<<<<<<<<<<<< + * return + * pv_name = handlePV + */ + __pyx_t_1 = (__pyx_v_cb == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":289 + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: + * return # <<<<<<<<<<<<<< + * pv_name = handlePV + * self.hh.setPyConnectCallbackFn(handlePV, cb) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":288 + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: # <<<<<<<<<<<<<< + * return + * pv_name = handlePV + */ + } + + /* "PyCafe.pyx":290 + * if cb is None: + * return + * pv_name = handlePV # <<<<<<<<<<<<<< + * self.hh.setPyConnectCallbackFn(handlePV, cb) + * + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_pv_name = __pyx_v_handlePV; + + /* "PyCafe.pyx":291 + * return + * pv_name = handlePV + * self.hh.setPyConnectCallbackFn(handlePV, cb) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error) + (void)(__pyx_v_self->hh.setPyConnectCallbackFn(__pyx_t_3, ((void *)__pyx_v_cb))); + + /* "PyCafe.pyx":287 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setPyConnectCallbackFn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pv_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":295 + * + * ############################################################################ + * def init(self): # <<<<<<<<<<<<<< + * """Initialize channel access. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_16init[] = "Initialize channel access.\n\n This method is called by ``__cinit__`` when instantiating CyCafe. \n It may, optionally, be called by the user when creating a new channel \n access context, e.g., if in a separate thread. If omitted, it will \n otherwise be called internally by CAFE. \n \n Raises:\n MemoryError: If insufficient memory to initialize channel access. \n Epics status reports ECA_ALLOCMEM. Application cannot continue.\n\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("init (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16init(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("init", 0); + + /* "PyCafe.pyx":308 + * + * """ + * cdef str _METHOD = "init" # <<<<<<<<<<<<<< + * try: + * self._c_cafe.init() + */ + __Pyx_INCREF(__pyx_n_u_init); + __pyx_v__METHOD = __pyx_n_u_init; + + /* "PyCafe.pyx":309 + * """ + * cdef str _METHOD = "init" + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + { + (void)__pyx_t_1; (void)__pyx_t_2; (void)__pyx_t_3; /* mark used */ + /*try:*/ { + + /* "PyCafe.pyx":310 + * cdef str _METHOD = "init" + * try: + * self._c_cafe.init() # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance(e.args, (tuple)): + */ + (void)(__pyx_v_self->_c_cafe->init()); + + /* "PyCafe.pyx":309 + * """ + * cdef str _METHOD = "init" + * try: # <<<<<<<<<<<<<< + * self._c_cafe.init() + * except RuntimeError as e: + */ + } + } + + /* "PyCafe.pyx":295 + * + * ############################################################################ + * def init(self): # <<<<<<<<<<<<<< + * """Initialize channel access. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":324 + * + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_18withExceptions[] = "Activate/deactivate CAFE exceptions for single channel operations.\n\n If the input argument, exceptions, is set to False, the user is obliged\n to examine the return code of any set/get method that instigates a CAFE\n transaction on a single channel.\n\n Args:\n exceptions (bool): Activates/deactivates CAFE exceptions if\n True/False for single channel operations. The default is True.\n\n Returns:\n bool: Confirmation of the set value\n ::\n\n res = cafe.withExceptions(True|False)\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_exceptions; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("withExceptions (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exceptions,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exceptions); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "withExceptions") < 0)) __PYX_ERR(0, 324, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_exceptions = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_exceptions == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L3_error) + } else { + __pyx_v_exceptions = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("withExceptions", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 324, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.withExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_18withExceptions(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_exceptions); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_18withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("withExceptions", 0); + + /* "PyCafe.pyx":342 + * """ + * + * self._enable_exceptions = exceptions # <<<<<<<<<<<<<< + * return self._enable_exceptions + * + */ + __pyx_v_self->_enable_exceptions = __pyx_v_exceptions; + + /* "PyCafe.pyx":343 + * + * self._enable_exceptions = exceptions + * return self._enable_exceptions # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_enable_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":324 + * + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.withExceptions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":347 + * + * @property + * def enableExceptions(self): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16enableExceptions___get__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "PyCafe.pyx":363 + * """ + * + * return self._enable_exceptions # <<<<<<<<<<<<<< + * + * @enableExceptions.setter + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_enable_exceptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":347 + * + * @property + * def enableExceptions(self): # <<<<<<<<<<<<<< + * """Activate/deactivate CAFE exceptions for single channel operations. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.enableExceptions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":366 + * + * @enableExceptions.setter + * def enableExceptions(self, bint enable): # <<<<<<<<<<<<<< + * self._enable_exceptions = enable + * + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable); /*proto*/ +static int __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable) { + int __pyx_v_enable; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + assert(__pyx_arg_enable); { + __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 366, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.enableExceptions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_enable)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_6CyCafe_16enableExceptions_2__set__(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_enable) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + + /* "PyCafe.pyx":367 + * @enableExceptions.setter + * def enableExceptions(self, bint enable): + * self._enable_exceptions = enable # <<<<<<<<<<<<<< + * + * cdef prepareCafeException( + */ + __pyx_v_self->_enable_exceptions = __pyx_v_enable; + + /* "PyCafe.pyx":366 + * + * @enableExceptions.setter + * def enableExceptions(self, bint enable): # <<<<<<<<<<<<<< + * self._enable_exceptions = enable + * + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":369 + * self._enable_exceptions = enable + * + * cdef prepareCafeException( # <<<<<<<<<<<<<< + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + */ + +static PyObject *__pyx_f_6PyCafe_6CyCafe_prepareCafeException(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_status, PyObject *__pyx_v__METHOD, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args) { + unsigned int __pyx_v_handle = ((unsigned int)0); + + /* "PyCafe.pyx":371 + * cdef prepareCafeException( + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): # <<<<<<<<<<<<<< + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) + */ + PyObject *__pyx_v_pv_name = ((PyObject*)Py_None); + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("prepareCafeException", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_handle = __pyx_optional_args->handle; + if (__pyx_optional_args->__pyx_n > 1) { + __pyx_v_pv_name = __pyx_optional_args->pv_name; + } + } + } + __Pyx_INCREF(__pyx_v_pv_name); + + /* "PyCafe.pyx":372 + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: # <<<<<<<<<<<<<< + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + */ + __pyx_t_2 = ((__pyx_v_handle > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_pv_name == ((PyObject*)Py_None)); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "PyCafe.pyx":373 + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_pv_name, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":372 + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + * if handle > 0 and pv_name is None: # <<<<<<<<<<<<<< + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":375 + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":376 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * return _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_v_pv_name) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + + /* "PyCafe.pyx":377 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * return _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":374 + * if handle > 0 and pv_name is None: + * pv_name=self._c_cafe.getPVFromHandle(handle) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _error_code=status, _pv_name=pv_name, + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":378 + * _error_code=status, _pv_name=pv_name, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * return _cafeException # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v__cafeException)); + __pyx_r = ((PyObject *)__pyx_v__cafeException); + goto __pyx_L0; + + /* "PyCafe.pyx":369 + * self._enable_exceptions = enable + * + * cdef prepareCafeException( # <<<<<<<<<<<<<< + * self, int status, str _METHOD, + * unsigned int handle = 0, pv_name: str = None): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.prepareCafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_pv_name); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":382 + * ############################################################################ + * + * def isValid(self, unsigned int handle): # <<<<<<<<<<<<<< + * return self._c_cafe.isValid(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21isValid(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21isValid(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isValid (wrapper)", 0); + assert(__pyx_arg_handle); { + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 382, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isValid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_20isValid(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((unsigned int)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20isValid(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isValid", 0); + + /* "PyCafe.pyx":383 + * + * def isValid(self, unsigned int handle): + * return self._c_cafe.isValid(handle) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isValid(__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":382 + * ############################################################################ + * + * def isValid(self, unsigned int handle): # <<<<<<<<<<<<<< + * return self._c_cafe.isValid(handle) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isValid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":387 + * + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.removeWidget(handle, widget) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23removeWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23removeWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + unsigned int __pyx_v_handle; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("removeWidget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_4,&__pyx_n_s_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_4)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("removeWidget", 1, 2, 2, 1); __PYX_ERR(0, 387, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "removeWidget") < 0)) __PYX_ERR(0, 387, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L3_error) + __pyx_v_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("removeWidget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 387, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.removeWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_22removeWidget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handle, __pyx_v_widget); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22removeWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("removeWidget", 0); + + /* "PyCafe.pyx":388 + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): + * return self.hh.removeWidget(handle, widget) # <<<<<<<<<<<<<< + * + * def addWidget(self, unsigned int handle, object widget): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hh.removeWidget(__pyx_v_handle, ((void *)__pyx_v_widget))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":387 + * + * ############################################################################ + * def removeWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.removeWidget(handle, widget) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.removeWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":390 + * return self.hh.removeWidget(handle, widget) + * + * def addWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.addWidget(handle, widget) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25addWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25addWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + unsigned int __pyx_v_handle; + PyObject *__pyx_v_widget = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("addWidget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_4,&__pyx_n_s_widget,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_4)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_widget)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("addWidget", 1, 2, 2, 1); __PYX_ERR(0, 390, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addWidget") < 0)) __PYX_ERR(0, 390, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 390, __pyx_L3_error) + __pyx_v_widget = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("addWidget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 390, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.addWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_24addWidget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handle, __pyx_v_widget); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_24addWidget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle, PyObject *__pyx_v_widget) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("addWidget", 0); + + /* "PyCafe.pyx":391 + * + * def addWidget(self, unsigned int handle, object widget): + * return self.hh.addWidget(handle, widget) # <<<<<<<<<<<<<< + * + * def getWidgets(self, unsigned int handle): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hh.addWidget(__pyx_v_handle, ((void *)__pyx_v_widget))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":390 + * return self.hh.removeWidget(handle, widget) + * + * def addWidget(self, unsigned int handle, object widget): # <<<<<<<<<<<<<< + * return self.hh.addWidget(handle, widget) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.addWidget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":393 + * return self.hh.addWidget(handle, widget) + * + * def getWidgets(self, unsigned int handle): # <<<<<<<<<<<<<< + * cdef vector[void *] widgetV + * widgetV.reserve(2) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27getWidgets(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27getWidgets(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWidgets (wrapper)", 0); + assert(__pyx_arg_handle); { + __pyx_v_handle = __Pyx_PyInt_As_unsigned_int(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 393, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getWidgets", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_26getWidgets(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((unsigned int)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_26getWidgets(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, unsigned int __pyx_v_handle) { + std::vector __pyx_v_widgetV; + PyObject *__pyx_v_widgetList = NULL; + CYTHON_UNUSED int __pyx_v_status; + std::vector ::size_type __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::vector ::size_type __pyx_t_2; + std::vector ::size_type __pyx_t_3; + std::vector ::size_type __pyx_t_4; + void *__pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("getWidgets", 0); + + /* "PyCafe.pyx":395 + * def getWidgets(self, unsigned int handle): + * cdef vector[void *] widgetV + * widgetV.reserve(2) # <<<<<<<<<<<<<< + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) + */ + __pyx_v_widgetV.reserve(2); + + /* "PyCafe.pyx":396 + * cdef vector[void *] widgetV + * widgetV.reserve(2) + * widgetList = [] # <<<<<<<<<<<<<< + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_widgetList = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":397 + * widgetV.reserve(2) + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) # <<<<<<<<<<<<<< + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) + */ + __pyx_v_status = __pyx_v_self->hh.getWidgets(__pyx_v_handle, __pyx_v_widgetV); + + /* "PyCafe.pyx":398 + * widgetList = [] + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): # <<<<<<<<<<<<<< + * widgetList.append( < object > widgetV[i]) + * return widgetList + */ + __pyx_t_2 = __pyx_v_widgetV.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":399 + * status = self.hh.getWidgets(handle, widgetV) + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) # <<<<<<<<<<<<<< + * return widgetList + * ############################################################################ + */ + __pyx_t_5 = (__pyx_v_widgetV[__pyx_v_i]); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_widgetList, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 399, __pyx_L1_error) + } + + /* "PyCafe.pyx":400 + * for i in range(0, widgetV.size()): + * widgetList.append( < object > widgetV[i]) + * return widgetList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_widgetList); + __pyx_r = __pyx_v_widgetList; + goto __pyx_L0; + + /* "PyCafe.pyx":393 + * return self.hh.addWidget(handle, widget) + * + * def getWidgets(self, unsigned int handle): # <<<<<<<<<<<<<< + * cdef vector[void *] widgetV + * widgetV.reserve(2) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getWidgets", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_widgetList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":409 + * + * + * def open(self, pv, cb: object = None): # <<<<<<<<<<<<<< + * """Returns handle (object reference) for given process variable. + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_28open[] = "Returns handle (object reference) for given process variable.\n \n Establishes a channel access virtual circuit to the given process \n variable, pv. The optional user supplied callback function reports on \n the connection state. Within the callback, all cafe operations that \n retrieve data from cache and send data values to the process variable\n are permitted. Typically, such callback functions are used in GUI \n development, and in complex procedures, such as feedback systems in \n virtual accelerators.\n\n Args:\n pv (:obj:`str`, :obj:`bytes`, :obj:`list` of :obj:`str` or :obj:`bytes`): \n The process variable name(s)\n cb (:obj:`object`, optional): A user supplied callback function to \n be invoked upon first connection and subsequent changes to the\n connection state. Defaults to None. The callback function must\n have the required signature (:obj:`int`, :obj:`str`, :obj:`int`)\n\n Returns:\n :obj:`int` | :obj:`list` of :obj:`int`: handle(s) to the given pv(s).\n\n\n Raises:\n TypeError: If handle/PV is not instance of `int` or (`str`,`bytes`), \n respectively.\n\n .. code-block:: python\n\n py_connect_callback(handle, pv_name, status): \n if status == cyca.ICAFE_CS_CONN: \n value = cafe.getCache(handle[, dt=`str`])\n ...\n elif status == cyca.ICAFE_CS_DISCONN: \n ...\n\n ::\n \n handle = cafe.open(pv=pv_name[, cb=py_connect_callback])\n\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("open (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open") < 0)) __PYX_ERR(0, 409, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("open", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 409, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_28open(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_pvV; + std::vector __pyx_v_handleV; + Py_ssize_t __pyx_v_i; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_errors = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_handle; + char *__pyx_v_pvStr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + std::string __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + char const *__pyx_t_19; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + int __pyx_t_26; + char *__pyx_t_27; + char const *__pyx_t_28; + __Pyx_RefNannySetupContext("open", 0); + + /* "PyCafe.pyx":450 + * + * """ + * cdef str _METHOD = "open" # <<<<<<<<<<<<<< + * cdef vector[string] pvV + * cdef vector[unsigned int] handleV + */ + __Pyx_INCREF(__pyx_n_u_open); + __pyx_v__METHOD = __pyx_n_u_open; + + /* "PyCafe.pyx":455 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + */ + __pyx_t_1 = PyList_Check(__pyx_v_pv); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":456 + * + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): # <<<<<<<<<<<<<< + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_pv); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":457 + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":458 + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) # <<<<<<<<<<<<<< + * elif isinstance(pv[i], bytes): + * pvV.push_back(pv[i].decode('utf_8') ) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 458, __pyx_L1_error) + } + + /* "PyCafe.pyx":457 + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":459 + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":460 + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): + * pvV.push_back(pv[i].decode('utf_8') ) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 460, __pyx_L1_error) + } + + /* "PyCafe.pyx":459 + * if isinstance(pv[i], str): + * pvV.push_back(pv[i]) + * elif isinstance(pv[i], bytes): # <<<<<<<<<<<<<< + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":462 + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("The pv name entered within list should be " + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":463 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("The pv name entered within list should be " + * "of type or "))) + */ + __pyx_t_8 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_The_pv_name_entered_within_list}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_The_pv_name_entered_within_list}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_The_pv_name_entered_within_list); + __Pyx_GIVEREF(__pyx_kp_u_The_pv_name_entered_within_list); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_kp_u_The_pv_name_entered_within_list); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":462 + * pvV.push_back(pv[i].decode('utf_8') ) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("The pv name entered within list should be " + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 462, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":466 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":467 + * "of type or "))) + * try: + * if cb is not None: # <<<<<<<<<<<<<< + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":469 + * if cb is not None: + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(1); + + /* "PyCafe.pyx":470 + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyConnectHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":467 + * "of type or "))) + * try: + * if cb is not None: # <<<<<<<<<<<<<< + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + } + + /* "PyCafe.pyx":473 + * + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.openV(pvV, handleV) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":474 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.openV(pvV, handleV) # <<<<<<<<<<<<<< + * ELSE: + * #Gil acquired and released within conduit.h + */ + try { + __pyx_t_10 = __pyx_v_self->_c_cafe->openV(__pyx_v_pvV, __pyx_v_handleV); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(0, 474, __pyx_L15_error) + } + __pyx_v_status = __pyx_t_10; + } + + /* "PyCafe.pyx":473 + * + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.openV(pvV, handleV) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L16; + } + __pyx_L15_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L7_error; + } + __pyx_L16:; + } + } + + /* "PyCafe.pyx":479 + * #with nogil: + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): # <<<<<<<<<<<<<< + * time.sleep(0.2) + * else: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initCallbackComplete); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_handleV); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 479, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 479, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 479, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":480 + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): + * time.sleep(0.2) # <<<<<<<<<<<<<< + * else: + * time.sleep(0.02) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 480, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_9 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_float_0_2) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_float_0_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":479 + * #with nogil: + * status = self._c_cafe.openV(pvV, handleV) + * if not self.initCallbackComplete(handleV): # <<<<<<<<<<<<<< + * time.sleep(0.2) + * else: + */ + goto __pyx_L17; + } + + /* "PyCafe.pyx":482 + * time.sleep(0.2) + * else: + * time.sleep(0.02) # <<<<<<<<<<<<<< + * except RuntimeError as e: + * # Reset + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_time); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 482, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_float_0_02) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_02); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 482, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L17:; + + /* "PyCafe.pyx":466 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L12_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":483 + * else: + * time.sleep(0.02) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError); + if (__pyx_t_10) { + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_6, &__pyx_t_11) < 0) __PYX_ERR(0, 483, __pyx_L9_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_e = __pyx_t_6; + /*try:*/ { + + /* "PyCafe.pyx":485 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":486 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * + * if isinstance(e.args, (tuple)): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":485 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + */ + } + + /* "PyCafe.pyx":488 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 488, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyTuple_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":490 + * if isinstance(e.args, (tuple)): + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") + * if len(errors) > 5: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 490, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 490, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_15, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 490, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":491 + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # <<<<<<<<<<<<<< + * if len(errors) > 5: + * _cafeException = CafeException( + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 491, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 491, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 491, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_16)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_16, __pyx_kp_u__41) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__41); + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 491, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_errors = __pyx_t_15; + __pyx_t_15 = 0; + + /* "PyCafe.pyx":492 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_3 = PyObject_Length(__pyx_v_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L23_error) + __pyx_t_1 = ((__pyx_t_3 > 5) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":494 + * if len(errors) > 5: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), + */ + __pyx_t_15 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_15); + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + + /* "PyCafe.pyx":495 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), # <<<<<<<<<<<<<< + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 495, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_handle, __pyx_t_16) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafe.pyx":496 + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), # <<<<<<<<<<<<<< + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + */ + __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_errors, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 496, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 496, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":497 + * _pv_name=errors[1], _handle=int(errors[2]), + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) # <<<<<<<<<<<<<< + * raise _cafeException + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 497, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_errors, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 497, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(0, 494, __pyx_L23_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":493 + * errors = e.args[0].split(",") + * if len(errors) > 5: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], _handle=int(errors[2]), + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":498 + * _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException # <<<<<<<<<<<<<< + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 498, __pyx_L23_error) + + /* "PyCafe.pyx":492 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":490 + * if isinstance(e.args, (tuple)): + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") + * if len(errors) > 5: + */ + } + + /* "PyCafe.pyx":488 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * # equivalent to e.what() + * if 'CAFEException' in (e.args[0]): + */ + } + + /* "PyCafe.pyx":499 + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) # <<<<<<<<<<<<<< + * + * if cb is not None: + */ + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_16)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_15)) { + PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) { + PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_17 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_17); + if (__pyx_t_16) { + __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_10, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_10, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_10, __pyx_v_e); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 499, __pyx_L23_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_15, 0, 0, 0); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __PYX_ERR(0, 499, __pyx_L23_error) + } + + /* "PyCafe.pyx":483 + * else: + * time.sleep(0.02) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_XDECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L24; + } + __pyx_L23_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __pyx_t_10 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25); + } + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22); + __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; + __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; + goto __pyx_L9_except_error; + } + __pyx_L24:; + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + __pyx_L9_except_error:; + + /* "PyCafe.pyx":466 + * ("The pv name entered within list should be " + * "of type or "))) + * try: # <<<<<<<<<<<<<< + * if cb is not None: + * + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L8_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L12_try_end:; + } + + /* "PyCafe.pyx":501 + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + * if cb is not None: # <<<<<<<<<<<<<< + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":503 + * if cb is not None: + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * return handleV + * + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":501 + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + * + * if cb is not None: # <<<<<<<<<<<<<< + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + */ + } + + /* "PyCafe.pyx":504 + * # Reset + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * return handleV # <<<<<<<<<<<<<< + * + * elif not isinstance(pv, (bytes, str)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_handleV); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":455 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], str): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":506 + * return handleV + * + * elif not isinstance(pv, (bytes, str)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_1 = PyBytes_Check(__pyx_v_pv); + __pyx_t_26 = (__pyx_t_1 != 0); + if (!__pyx_t_26) { + } else { + __pyx_t_2 = __pyx_t_26; + goto __pyx_L34_bool_binop_done; + } + __pyx_t_26 = PyUnicode_Check(__pyx_v_pv); + __pyx_t_1 = (__pyx_t_26 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L34_bool_binop_done:; + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":507 + * + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, pv, should be of type ")) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":508 + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, pv, should be of type ")) + * + */ + __pyx_t_9 = NULL; + __pyx_t_18 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_18 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_pv_should_be_of_t}; + __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_11); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_pv_should_be_of_t}; + __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_11); + } else + #endif + { + __pyx_t_15 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_18, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_18, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_pv_should_be_of_t); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_pv_should_be_of_t); + PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_18, __pyx_kp_u_Input_argument_pv_should_be_of_t); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":507 + * + * elif not isinstance(pv, (bytes, str)): + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, pv, should be of type ")) + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 507, __pyx_L1_error) + + /* "PyCafe.pyx":506 + * return handleV + * + * elif not isinstance(pv, (bytes, str)): # <<<<<<<<<<<<<< + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":511 + * "Input argument, pv, should be of type ")) + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * cdef vector[string] vecS + * + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":514 + * cdef vector[string] vecS + * + * cdef char * pvStr = pv # <<<<<<<<<<<<<< + * + * if cb is not None: + */ + __pyx_t_27 = __Pyx_PyObject_AsWritableString(__pyx_v_pv); if (unlikely((!__pyx_t_27) && PyErr_Occurred())) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_v_pvStr = __pyx_t_27; + + /* "PyCafe.pyx":516 + * cdef char * pvStr = pv + * + * if cb is not None: # <<<<<<<<<<<<<< + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":518 + * if cb is not None: + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(1); + + /* "PyCafe.pyx":519 + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) # <<<<<<<<<<<<<< + * try: + * IF PY_EXT_C: + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyConnectHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":516 + * cdef char * pvStr = pv + * + * if cb is not None: # <<<<<<<<<<<<<< + * + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + */ + } + + /* "PyCafe.pyx":520 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":523 + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.open(pvStr, handle) + * #print("OPEN WITH NO GIL//==>", pvStr, handle) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":524 + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: + * self._c_cafe.open(pvStr, handle) # <<<<<<<<<<<<<< + * #print("OPEN WITH NO GIL//==>", pvStr, handle) + * ELSE: + */ + try { + __pyx_v_self->_c_cafe->open(__pyx_v_pvStr, __pyx_v_handle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(0, 524, __pyx_L44_error) + } + } + + /* "PyCafe.pyx":523 + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.open(pvStr, handle) + * #print("OPEN WITH NO GIL//==>", pvStr, handle) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L45; + } + __pyx_L44_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L37_error; + } + __pyx_L45:; + } + } + + /* "PyCafe.pyx":520 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L42_try_end; + __pyx_L37_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":530 + * #with nogil: + * self._c_cafe.open(pvStr, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError); + if (__pyx_t_18) { + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_11, &__pyx_t_15) < 0) __PYX_ERR(0, 530, __pyx_L39_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GOTREF(__pyx_t_15); + __Pyx_INCREF(__pyx_t_11); + __pyx_v_e = __pyx_t_11; + /*try:*/ { + + /* "PyCafe.pyx":532 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":533 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":532 + * except RuntimeError as e: + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + */ + } + + /* "PyCafe.pyx":534 + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = PyTuple_Check(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":535 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 535, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 535, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":536 + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() # <<<<<<<<<<<<<< + * if len(errors) > 5: + * _cafeException = CafeException( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 536, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_17, __pyx_kp_u__41) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u__41); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_errors = __pyx_t_8; + __pyx_t_8 = 0; + + /* "PyCafe.pyx":537 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_3 = PyObject_Length(__pyx_v_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 537, __pyx_L51_error) + __pyx_t_1 = ((__pyx_t_3 > 5) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":539 + * if len(errors) > 5: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), + */ + __pyx_t_8 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + + /* "PyCafe.pyx":540 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], # <<<<<<<<<<<<<< + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_errors, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_pv_name, __pyx_t_9) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":541 + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), # <<<<<<<<<<<<<< + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_errors, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 541, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_handle, __pyx_t_17) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_errors, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 541, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_code, __pyx_t_9) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":542 + * _pv_name=errors[1], + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_errors, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_text, __pyx_t_9) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_errors, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_error_info, __pyx_t_9) < 0) __PYX_ERR(0, 539, __pyx_L51_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":538 + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _pv_name=errors[1], + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 538, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":543 + * _handle=int(errors[2]), _error_code=int(errors[3]), + * _error_text=errors[4], _error_info=errors[5]) + * raise _cafeException # <<<<<<<<<<<<<< + * + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 543, __pyx_L51_error) + + /* "PyCafe.pyx":537 + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":535 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): + * if 'CAFEException' in (e.args[0]): # <<<<<<<<<<<<<< + * errors = e.args[0].split(",") # from e.what() + * if len(errors) > 5: + */ + } + + /* "PyCafe.pyx":534 + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * if isinstance(e.args, (tuple)): # <<<<<<<<<<<<<< + * if 'CAFEException' in (e.args[0]): + * errors = e.args[0].split(",") # from e.what() + */ + } + + /* "PyCafe.pyx":545 + * raise _cafeException + * + * raise Exception("{} {} \n{}".format(self._exception_text, _METHOD, e)) # <<<<<<<<<<<<<< + * + * # Reset + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_17 = NULL; + __pyx_t_18 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_18 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_v_e}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_16 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_16); + if (__pyx_t_17) { + __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __pyx_t_17 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_18, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_18, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_18, __pyx_v_e); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L51_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(0, 545, __pyx_L51_error) + } + + /* "PyCafe.pyx":530 + * #with nogil: + * self._c_cafe.open(pvStr, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * # Reset + * if cb is not None: + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_XDECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L52; + } + __pyx_L51_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __pyx_t_18 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_28 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20); + } + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23); + __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; + __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_28; + goto __pyx_L39_except_error; + } + __pyx_L52:; + } + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L38_exception_handled; + } + goto __pyx_L39_except_error; + __pyx_L39_except_error:; + + /* "PyCafe.pyx":520 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(True) + * self._c_cafe.channelCreatePolicy.setPyConnectHandler(cb) + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * #print("OPEN WITH NO GIL==>", pvStr) + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L38_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L42_try_end:; + } + + /* "PyCafe.pyx":548 + * + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":549 + * # Reset + * if cb is not None: + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) # <<<<<<<<<<<<<< + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): + */ + __pyx_v_self->_c_cafe->channelCreatePolicy.setPyCallbackFlag(0); + + /* "PyCafe.pyx":548 + * + * # Reset + * if cb is not None: # <<<<<<<<<<<<<< + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + */ + } + + /* "PyCafe.pyx":551 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * time.sleep(0.1) + * else: + */ + __pyx_t_2 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":552 + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): + * time.sleep(0.1) # <<<<<<<<<<<<<< + * else: + * time.sleep(0.01) # Let pycallbacks complete + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_time); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_15 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_float_0_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_1); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + + /* "PyCafe.pyx":551 + * self._c_cafe.channelCreatePolicy.setPyCallbackFlag(False) + * # A notch to allow for possible race condition + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * time.sleep(0.1) + * else: + */ + goto __pyx_L62; + } + + /* "PyCafe.pyx":554 + * time.sleep(0.1) + * else: + * time.sleep(0.01) # Let pycallbacks complete # <<<<<<<<<<<<<< + * return handle + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_15 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + } + __pyx_L62:; + + /* "PyCafe.pyx":555 + * else: + * time.sleep(0.01) # Let pycallbacks complete + * return handle # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_r = __pyx_t_15; + __pyx_t_15 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":409 + * + * + * def open(self, pv, cb: object = None): # <<<<<<<<<<<<<< + * """Returns handle (object reference) for given process variable. + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_errors); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":558 + * + * ############################################################################ + * def openNoWait(self): # <<<<<<<<<<<<<< + * # channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # channelOpenPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31openNoWait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31openNoWait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNoWait (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_30openNoWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_30openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNoWait", 0); + + /* "PyCafe.pyx":562 + * # channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNoWait() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":563 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openNoWait() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openNoWait(); + } + + /* "PyCafe.pyx":562 + * # channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNoWait() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":564 + * with nogil: + * self._c_cafe.openNoWait() + * return # <<<<<<<<<<<<<< + * + * def openPrepare(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":558 + * + * ############################################################################ + * def openNoWait(self): # <<<<<<<<<<<<<< + * # channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # channelOpenPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":566 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33openPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33openPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_32openPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_32openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openPrepare", 0); + + /* "PyCafe.pyx":570 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openPrepare() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":571 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openPrepare() # <<<<<<<<<<<<<< + * + * def openGroupPrepare(self): + */ + __pyx_v_self->_c_cafe->openPrepare(); + } + + /* "PyCafe.pyx":570 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openPrepare() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":566 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_POLL) + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":573 + * self._c_cafe.openPrepare() + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + * # WITH_PEND_EVENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35openGroupPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35openGroupPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_34openGroupPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_34openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupPrepare", 0); + + /* "PyCafe.pyx":578 + * # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupPrepare() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":579 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openGroupPrepare() # <<<<<<<<<<<<<< + * + * def setOpenDefaultPendTime(self, double timeout): + */ + __pyx_v_self->_c_cafe->openGroupPrepare(); + } + + /* "PyCafe.pyx":578 + * # self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupPrepare() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":573 + * self._c_cafe.openPrepare() + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind( + * # WITH_PEND_EVENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":581 + * self._c_cafe.openGroupPrepare() + * + * def setOpenDefaultPendTime(self, double timeout): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setOpenDefaultPendTime (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_36setOpenDefaultPendTime(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":582 + * + * def setOpenDefaultPendTime(self, double timeout): + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) # <<<<<<<<<<<<<< + * + * def getOpenDefaultPendTime(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.setDefaultTimeout(__pyx_v_timeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":581 + * self._c_cafe.openGroupPrepare() + * + * def setOpenDefaultPendTime(self, double timeout): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":584 + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + * def getOpenDefaultPendTime(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39getOpenDefaultPendTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39getOpenDefaultPendTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getOpenDefaultPendTime (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_38getOpenDefaultPendTime(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":585 + * + * def getOpenDefaultPendTime(self): + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.getDefaultTimeout()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":584 + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + * def getOpenDefaultPendTime(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getOpenDefaultPendTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":589 + * + * ############################################################################ + * def openNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41openNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41openNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNow (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_40openNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNow", 0); + + /* "PyCafe.pyx":593 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNow() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":594 + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: + * self._c_cafe.openNow() # <<<<<<<<<<<<<< + * + * ############################################################################# + */ + __pyx_v_self->_c_cafe->openNow(); + } + + /* "PyCafe.pyx":593 + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * # self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNow() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":589 + * + * ############################################################################ + * def openNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * # self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":598 + * ############################################################################# + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openNowAndWait" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_v_handlesPV = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNowAndWait (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,&__pyx_n_s_handlesPV,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlesPV); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openNowAndWait") < 0)) __PYX_ERR(0, 598, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L3_error) + } else { + __pyx_v_timeout = ((double)0.0); + } + __pyx_v_handlesPV = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openNowAndWait", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 598, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_42openNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout, __pyx_v_handlesPV); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_42openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_handlesPV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + std::vector __pyx_v_pvV; + PyObject *__pyx_v_npoll = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("openNowAndWait", 0); + + /* "PyCafe.pyx":599 + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): + * cdef str _METHOD = "openNowAndWait" # <<<<<<<<<<<<<< + * + * if timeout <=0 : + */ + __Pyx_INCREF(__pyx_n_u_openNowAndWait); + __pyx_v__METHOD = __pyx_n_u_openNowAndWait; + + /* "PyCafe.pyx":601 + * cdef str _METHOD = "openNowAndWait" + * + * if timeout <=0 : # <<<<<<<<<<<<<< + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":602 + * + * if timeout <=0 : + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() # <<<<<<<<<<<<<< + * + * # self._c_cafe.channelOpenPolicy.setTimeout(timeout) + */ + __pyx_v_timeout = __pyx_v_self->_c_cafe->channelOpenPolicy.getTimeout(); + + /* "PyCafe.pyx":601 + * cdef str _METHOD = "openNowAndWait" + * + * if timeout <=0 : # <<<<<<<<<<<<<< + * timeout = self._c_cafe.channelOpenPolicy.getTimeout() + * + */ + } + + /* "PyCafe.pyx":613 + * cdef vector[unsigned int] hList + * cdef vector[string] pvV + * cdef npoll = 0 # <<<<<<<<<<<<<< + * + * if handlesPV is not None: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_npoll = __pyx_int_0; + + /* "PyCafe.pyx":615 + * cdef npoll = 0 + * + * if handlesPV is not None: # <<<<<<<<<<<<<< + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + */ + __pyx_t_1 = (__pyx_v_handlesPV != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":616 + * + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + */ + __pyx_t_2 = PyList_Check(__pyx_v_handlesPV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":617 + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): # <<<<<<<<<<<<<< + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlesPV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":618 + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":619 + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlesPV[i], (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 619, __pyx_L1_error) + } + + /* "PyCafe.pyx":618 + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":620 + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":621 + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPVName); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_handlesPV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 621, __pyx_L1_error) + } + + /* "PyCafe.pyx":620 + * if isinstance(handlesPV[i], (int, long)): + * hList.push_back(handlesPV[i]) + * elif isinstance(handlesPV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":623 + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be < type 'int' >" + + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":624 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_t}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_t}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_t); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_t); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_t); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":623 + * hList.push_back(self.getHandleFromPVName(handlesPV[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be < type 'int' >" + + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 623, __pyx_L1_error) + } + __pyx_L8:; + } + + /* "PyCafe.pyx":616 + * + * if handlesPV is not None: + * if isinstance(handlesPV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlesPV)): + * if isinstance(handlesPV[i], (int, long)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":627 + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlesPV); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlesPV); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":628 + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) # <<<<<<<<<<<<<< + * elif isinstance(handlesPV, (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlesPV); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 628, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 628, __pyx_L1_error) + } + + /* "PyCafe.pyx":627 + * ("List input arguments, should be < type 'int' >" + + * "if handle, else < type 'str' > if pv name"))) + * elif isinstance(handlesPV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":629 + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlesPV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":630 + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): + * hList.push_back(self.getHandleFromPVName(handlesPV)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPVName); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_handlesPV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlesPV); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 630, __pyx_L1_error) + } + + /* "PyCafe.pyx":629 + * elif isinstance(handlesPV, (int, long)): + * hList.push_back(handlesPV) + * elif isinstance(handlesPV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":632 + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":633 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, should be of type if handle, \ + * else if pv name")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_should_be_of_type); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_should_be_of_type); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_Input_argument_should_be_of_type); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":632 + * hList.push_back(self.getHandleFromPVName(handlesPV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 632, __pyx_L1_error) + } + __pyx_L5:; + + /* "PyCafe.pyx":636 + * "Input argument, should be of type if handle, \ + * else if pv name")) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":637 + * else if pv name")) + * with nogil: + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) # <<<<<<<<<<<<<< + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + */ + __pyx_v_self->_c_cafe->openNowAndWaitHandleV(__pyx_v_hList, __pyx_v_timeout); + } + + /* "PyCafe.pyx":636 + * "Input argument, should be of type if handle, \ + * else if pv name")) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":639 + * self._c_cafe.openNowAndWaitHandleV(hList, timeout) + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): # <<<<<<<<<<<<<< + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + */ + for (__pyx_t_3 = 0; __pyx_t_3 < 0x64; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":640 + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":641 + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) # <<<<<<<<<<<<<< + * npoll = npoll+1 + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sleep); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":642 + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + * npoll = npoll+1 # <<<<<<<<<<<<<< + * else: + * break + */ + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_npoll, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_npoll, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":640 + * # Did all callbacks complete? wait 50ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":644 + * npoll = npoll+1 + * else: + * break # <<<<<<<<<<<<<< + * # if npoll > 1: + * # print("npoll in _c_cafe.initCallbackCompleteV(hList)", npoll) + */ + /*else*/ { + goto __pyx_L17_break; + } + __pyx_L18:; + } + __pyx_L17_break:; + + /* "PyCafe.pyx":615 + * cdef npoll = 0 + * + * if handlesPV is not None: # <<<<<<<<<<<<<< + * if isinstance(handlesPV, (list)): + * for i in range(0, len(handlesPV)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":649 + * + * else: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWait(timeout) + * ###handleList, pvList = self.getHandles() + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":650 + * else: + * with nogil: + * self._c_cafe.openNowAndWait(timeout) # <<<<<<<<<<<<<< + * ###handleList, pvList = self.getHandles() + * + */ + __pyx_v_self->_c_cafe->openNowAndWait(__pyx_v_timeout); + } + + /* "PyCafe.pyx":649 + * + * else: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openNowAndWait(timeout) + * ###handleList, pvList = self.getHandles() + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L21; + } + __pyx_L21:; + } + } + + /* "PyCafe.pyx":653 + * ###handleList, pvList = self.getHandles() + * + * self.hh.getHandles(hList, pvV) # <<<<<<<<<<<<<< + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + */ + (void)(__pyx_v_self->hh.getHandles(__pyx_v_hList, __pyx_v_pvV)); + + /* "PyCafe.pyx":655 + * self.hh.getHandles(hList, pvV) + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): # <<<<<<<<<<<<<< + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + */ + for (__pyx_t_3 = 0; __pyx_t_3 < 0x64; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":656 + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":657 + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) # <<<<<<<<<<<<<< + * npoll = npoll+1 + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sleep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":658 + * if not self._c_cafe.initCallbackCompleteV(hList): + * time.sleep(0.001) + * npoll = npoll+1 # <<<<<<<<<<<<<< + * else: + * break + */ + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_npoll, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_npoll, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":656 + * # Did all callbacks complete? wait 10ms + * for i in range(0, 100): + * if not self._c_cafe.initCallbackCompleteV(hList): # <<<<<<<<<<<<<< + * time.sleep(0.001) + * npoll = npoll+1 + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":660 + * npoll = npoll+1 + * else: + * break # <<<<<<<<<<<<<< + * #print("npoll in self._c_cafe.initCallbackCompleteV(hList)", npoll) + * + */ + /*else*/ { + goto __pyx_L23_break; + } + __pyx_L24:; + } + __pyx_L23_break:; + } + __pyx_L4:; + + /* "PyCafe.pyx":598 + * ############################################################################# + * + * def openNowAndWait(self, double timeout=0, handlesPV=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openNowAndWait" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.openNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_npoll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":668 + * ############################################################################ + * + * def openGroupNowAndWait(self, double timeout=0): # <<<<<<<<<<<<<< + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWait (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openGroupNowAndWait") < 0)) __PYX_ERR(0, 668, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 668, __pyx_L3_error) + } else { + __pyx_v_timeout = ((double)0.0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 668, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_44openGroupNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_44openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("openGroupNowAndWait", 0); + + /* "PyCafe.pyx":669 + * + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":670 + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() # <<<<<<<<<<<<<< + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + * # self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + */ + (void)(__pyx_v_self->_c_cafe->channelOpenGroupPolicy.getTimeout()); + + /* "PyCafe.pyx":669 + * + * def openGroupNowAndWait(self, double timeout=0): + * if timeout <= 0: # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + * # self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + */ + } + + /* "PyCafe.pyx":679 + * # WITH_PEND_EVENT) + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupNowAndWait(timeout) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":680 + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: + * self._c_cafe.openGroupNowAndWait(timeout) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openGroupNowAndWait(__pyx_v_timeout); + } + + /* "PyCafe.pyx":679 + * # WITH_PEND_EVENT) + * # self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openGroupNowAndWait(timeout) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":681 + * with nogil: + * self._c_cafe.openGroupNowAndWait(timeout) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":668 + * ############################################################################ + * + * def openGroupNowAndWait(self, double timeout=0): # <<<<<<<<<<<<<< + * if timeout <= 0: + * self._c_cafe.channelOpenGroupPolicy.getTimeout() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":687 + * ############################################################################ + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47openGroupNowAndWaitForInputGroups(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47openGroupNowAndWaitForInputGroups(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_timeout; + PyObject *__pyx_v_groupHandles = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWaitForInputGroups (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,&__pyx_n_s_groupHandles,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_groupHandles)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWaitForInputGroups", 1, 2, 2, 1); __PYX_ERR(0, 687, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "openGroupNowAndWaitForInputGroups") < 0)) __PYX_ERR(0, 687, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L3_error) + __pyx_v_groupHandles = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("openGroupNowAndWaitForInputGroups", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 687, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWaitForInputGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_46openGroupNowAndWaitForInputGroups(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_timeout, __pyx_v_groupHandles); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_46openGroupNowAndWaitForInputGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout, PyObject *__pyx_v_groupHandles) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + char const *__pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + __Pyx_RefNannySetupContext("openGroupNowAndWaitForInputGroups", 0); + + /* "PyCafe.pyx":688 + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hList + */ + __Pyx_INCREF(__pyx_n_u_openGroupNowAndWaitForInputGroup); + __pyx_v__METHOD = __pyx_n_u_openGroupNowAndWaitForInputGroup; + + /* "PyCafe.pyx":692 + * cdef vector[unsigned int] hList + * + * if isinstance(groupHandles, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_groupHandles); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":693 + * + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): # <<<<<<<<<<<<<< + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_groupHandles); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 693, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":694 + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":695 + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) # <<<<<<<<<<<<<< + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 695, __pyx_L1_error) + } + + /* "PyCafe.pyx":694 + * if isinstance(groupHandles, (list)): + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":696 + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":698 + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_groupHandles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_6); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error) + + /* "PyCafe.pyx":697 + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): + * hList.push_back( # <<<<<<<<<<<<<< + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + */ + try { + __pyx_v_hList.push_back(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_9)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 697, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":696 + * if isinstance(groupHandles[i], (int, long)): + * hList.push_back(groupHandles[i]) + * elif isinstance(groupHandles[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back( + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":700 + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "PyCafe.pyx":701 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":700 + * self.hh.getGroupHandleFromGroupName(groupHandles[i])) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(0, 700, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":692 + * cdef vector[unsigned int] hList + * + * if isinstance(groupHandles, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(groupHandles)): + * if isinstance(groupHandles[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":704 + * "List input arguments, should be of type \ + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_groupHandles); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_groupHandles); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":705 + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) # <<<<<<<<<<<<<< + * elif isinstance(groupHandles, (str)): + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_groupHandles); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 705, __pyx_L1_error) + } + + /* "PyCafe.pyx":704 + * "List input arguments, should be of type \ + * if group handle, else if group name")) + * elif isinstance(groupHandles, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":706 + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_groupHandles); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":707 + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_groupHandles); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_9)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 707, __pyx_L1_error) + } + + /* "PyCafe.pyx":706 + * elif isinstance(groupHandles, (int, long)): + * hList.push_back(groupHandles) + * elif isinstance(groupHandles, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":709 + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Second input argument (if not a list), should be of " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":710 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("Second input argument (if not a list), should be of " + * "type if group handle, " + */ + __pyx_t_13 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_if_not_a_l}; + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_10); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_if_not_a_l}; + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_GOTREF(__pyx_t_10); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_13) { + __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13); __pyx_t_13 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_if_not_a_l); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_if_not_a_l); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_Second_input_argument_if_not_a_l); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":709 + * hList.push_back(self.hh.getGroupHandleFromGroupName(groupHandles)) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Second input argument (if not a list), should be of " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 709, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":716 + * + * # list to vector + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":717 + * # list to vector + * with nogil: + * self._c_cafe.groupOpenNowAndWait(timeout, hList) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->groupOpenNowAndWait(__pyx_v_timeout, __pyx_v_hList); + } + + /* "PyCafe.pyx":716 + * + * # list to vector + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":718 + * with nogil: + * self._c_cafe.groupOpenNowAndWait(timeout, hList) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":687 + * ############################################################################ + * + * def openGroupNowAndWaitForInputGroups(self, double timeout, groupHandles): # <<<<<<<<<<<<<< + * cdef str _METHOD = "openGroupNowAndWaitForInputGroups" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("PyCafe.CyCafe.openGroupNowAndWaitForInputGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":722 + * ############################################################################ + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49openMonitorPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49openMonitorPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorPrepare (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_48openMonitorPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorPrepare", 0); + + /* "PyCafe.pyx":726 + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorPrepare() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":727 + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: + * self._c_cafe.openMonitorPrepare() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->openMonitorPrepare(); + } + + /* "PyCafe.pyx":726 + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + * # FLUSH_DESIGNATED_TO_CLIENT) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorPrepare() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":728 + * with nogil: + * self._c_cafe.openMonitorPrepare() + * return # <<<<<<<<<<<<<< + * + * ############################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":722 + * ############################################################################ + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * # self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer( + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":732 + * ############################################################################## + * + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * # reset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51openMonitorNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51openMonitorNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorNow (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_50openMonitorNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("openMonitorNow", 0); + + /* "PyCafe.pyx":738 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind( + * # WITH_FLUSH_IO) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":739 + * # WITH_FLUSH_IO) + * with nogil: + * self._c_cafe.openMonitorNow() # <<<<<<<<<<<<<< + * time.sleep(0.01) + * return + */ + __pyx_v_self->_c_cafe->openMonitorNow(); + } + + /* "PyCafe.pyx":738 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind( + * # WITH_FLUSH_IO) + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":740 + * with nogil: + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) # <<<<<<<<<<<<<< + * return + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":741 + * self._c_cafe.openMonitorNow() + * time.sleep(0.01) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":732 + * ############################################################################## + * + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * # reset + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":747 + * ############################################################################ + * + * cdef getMonitorWhenToFlushSendBuffer(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() + * + */ + +static PyObject *__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getMonitorWhenToFlushSendBuffer", 0); + + /* "PyCafe.pyx":748 + * + * cdef getMonitorWhenToFlushSendBuffer(self): + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(__pyx_v_self->_c_cafe->channelMonitorPolicy.getWhenToFlushSendBuffer()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":747 + * ############################################################################ + * + * cdef getMonitorWhenToFlushSendBuffer(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelMonitorPolicy.getWhenToFlushSendBuffer() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorWhenToFlushSendBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":753 + * + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "openMonitorNowAndWait(timeout)" + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorNowAndWait (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 753, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_52openMonitorNowAndWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_52openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + double __pyx_t_2; + double __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("openMonitorNowAndWait", 0); + + /* "PyCafe.pyx":754 + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): + * cdef _METHOD = "openMonitorNowAndWait(timeout)" # <<<<<<<<<<<<<< + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * # self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + */ + __Pyx_INCREF(__pyx_kp_u_openMonitorNowAndWait_timeout); + __pyx_v__METHOD = __pyx_kp_u_openMonitorNowAndWait_timeout; + + /* "PyCafe.pyx":762 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":763 + * + * with nogil: + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) # <<<<<<<<<<<<<< + * + * if timeout <= 0: + */ + __pyx_t_1 = __pyx_v_self->_min_timeout; + __pyx_t_2 = __pyx_v_timeout; + if (((__pyx_t_1 > __pyx_t_2) != 0)) { + __pyx_t_3 = __pyx_t_1; + } else { + __pyx_t_3 = __pyx_t_2; + } + __pyx_v_self->_c_cafe->openMonitorNowAndWait(__pyx_t_3); + } + + /* "PyCafe.pyx":762 + * # self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":765 + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + * if timeout <= 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_4 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":767 + * if timeout <= 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__43, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":770 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to:"), self._min_timeout)) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->_min_timeout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_input_argument_timeout_must_be_a); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":767 + * if timeout <= 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 766, __pyx_L1_error) + + /* "PyCafe.pyx":765 + * self._c_cafe.openMonitorNowAndWait(max(timeout, self._min_timeout)) + * + * if timeout <= 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":753 + * + * ############################################################################ + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "openMonitorNowAndWait(timeout)" + * # self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.openMonitorNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":775 + * ############################################################################ + * + * def ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_event(timeout)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_pend_event (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_event", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_54ca_pend_event(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_54ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + double __pyx_v__timeout; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("ca_pend_event", 0); + + /* "PyCafe.pyx":776 + * + * def ca_pend_event(self, double timeout): + * cdef _METHOD = "ca_pend_event(timeout)" # <<<<<<<<<<<<<< + * + * cdef double _timeout = timeout + */ + __Pyx_INCREF(__pyx_kp_u_ca_pend_event_timeout); + __pyx_v__METHOD = __pyx_kp_u_ca_pend_event_timeout; + + /* "PyCafe.pyx":778 + * cdef _METHOD = "ca_pend_event(timeout)" + * + * cdef double _timeout = timeout # <<<<<<<<<<<<<< + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + */ + __pyx_v__timeout = __pyx_v_timeout; + + /* "PyCafe.pyx":779 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":780 + * cdef double _timeout = timeout + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT # <<<<<<<<<<<<<< + * + * self._c_cafe._ca_pend_event(_timeout) + */ + __pyx_v__timeout = DEFAULT_TIMEOUT_PEND_EVENT; + + /* "PyCafe.pyx":779 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + */ + } + + /* "PyCafe.pyx":782 + * _timeout = DEFAULT_TIMEOUT_PEND_EVENT + * + * self._c_cafe._ca_pend_event(_timeout) # <<<<<<<<<<<<<< + * + * if timeout < 0: + */ + (void)(__pyx_v_self->_c_cafe->_ca_pend_event(__pyx_v__timeout)); + + /* "PyCafe.pyx":784 + * self._c_cafe._ca_pend_event(_timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_1 = ((__pyx_v_timeout < 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":786 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__43, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":789 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to CAFE default:"), _timeout)) # <<<<<<<<<<<<<< + * + * def ca_pend_io(self, double timeout): + */ + __pyx_t_4 = PyFloat_FromDouble(__pyx_v__timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":786 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 785, __pyx_L1_error) + + /* "PyCafe.pyx":784 + * self._c_cafe._ca_pend_event(_timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":775 + * ############################################################################ + * + * def ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_event(timeout)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_event", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":791 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_pend_io(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_io(timeout)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_pend_io (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_io", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_56ca_pend_io(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_v__METHOD = 0; + double __pyx_v__timeout; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("ca_pend_io", 0); + + /* "PyCafe.pyx":792 + * + * def ca_pend_io(self, double timeout): + * cdef _METHOD = "ca_pend_io(timeout)" # <<<<<<<<<<<<<< + * + * cdef double _timeout = timeout + */ + __Pyx_INCREF(__pyx_kp_u_ca_pend_io_timeout); + __pyx_v__METHOD = __pyx_kp_u_ca_pend_io_timeout; + + /* "PyCafe.pyx":794 + * cdef _METHOD = "ca_pend_io(timeout)" + * + * cdef double _timeout = timeout # <<<<<<<<<<<<<< + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_IO + */ + __pyx_v__timeout = __pyx_v_timeout; + + /* "PyCafe.pyx":795 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + */ + __pyx_t_1 = ((__pyx_v_timeout <= 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":796 + * cdef double _timeout = timeout + * if timeout <= 0: + * _timeout = DEFAULT_TIMEOUT_PEND_IO # <<<<<<<<<<<<<< + * + * self._c_cafe._ca_pend_io(timeout) + */ + __pyx_v__timeout = DEFAULT_TIMEOUT_PEND_IO; + + /* "PyCafe.pyx":795 + * + * cdef double _timeout = timeout + * if timeout <= 0: # <<<<<<<<<<<<<< + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + */ + } + + /* "PyCafe.pyx":798 + * _timeout = DEFAULT_TIMEOUT_PEND_IO + * + * self._c_cafe._ca_pend_io(timeout) # <<<<<<<<<<<<<< + * + * if timeout < 0: + */ + (void)(__pyx_v_self->_c_cafe->_ca_pend_io(__pyx_v_timeout)); + + /* "PyCafe.pyx":800 + * self._c_cafe._ca_pend_io(timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + __pyx_t_1 = ((__pyx_v_timeout < 0.0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":802 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__43, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":805 + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + * "timeout reset to CAFE default:"), _timeout)) # <<<<<<<<<<<<<< + * + * def ca_poll(self): + */ + __pyx_t_4 = PyFloat_FromDouble(__pyx_v__timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_input_argument_timeout_must_be_a_2); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_kp_u_input_argument_timeout_must_be_a_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":802 + * if timeout < 0: + * raise UserWarning \ + * ("{} {} \n{} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("input argument, timeout, must be a positive number!\n" + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_UserWarning, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 801, __pyx_L1_error) + + /* "PyCafe.pyx":800 + * self._c_cafe._ca_pend_io(timeout) + * + * if timeout < 0: # <<<<<<<<<<<<<< + * raise UserWarning \ + * ("{} {} \n{} {}".format( + */ + } + + /* "PyCafe.pyx":791 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_pend_io(self, double timeout): # <<<<<<<<<<<<<< + * cdef _METHOD = "ca_pend_io(timeout)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.ca_pend_io", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":807 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_poll(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_poll() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59ca_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59ca_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_poll (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_58ca_poll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_poll", 0); + + /* "PyCafe.pyx":808 + * + * def ca_poll(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":809 + * def ca_poll(self): + * with nogil: + * self._c_cafe._ca_poll() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->_ca_poll()); + } + + /* "PyCafe.pyx":808 + * + * def ca_poll(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":807 + * "timeout reset to CAFE default:"), _timeout)) + * + * def ca_poll(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_poll() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":812 + * + * + * def ca_flush_io(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_flush_io() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61ca_flush_io(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61ca_flush_io(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_flush_io (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_60ca_flush_io(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_60ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ca_flush_io", 0); + + /* "PyCafe.pyx":813 + * + * def ca_flush_io(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":814 + * def ca_flush_io(self): + * with nogil: + * self._c_cafe._ca_flush_io() # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->_c_cafe->_ca_flush_io()); + } + + /* "PyCafe.pyx":813 + * + * def ca_flush_io(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":812 + * + * + * def ca_flush_io(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe._ca_flush_io() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":818 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63setChannelRequestPolicyGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63setChannelRequestPolicyGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when; + ChannelWaitForResponsePolicyKind __pyx_v_wait; + ChannelRequestPolicyKind __pyx_v_method; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setChannelRequestPolicyGet (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_when,&__pyx_n_s_wait,&__pyx_n_s_method,&__pyx_n_s_cb,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":821 + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + * ChannelRequestPolicyKind method, cb: object = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setChannelRequestPolicyGet" + */ + values[4] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_when)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 1); __PYX_ERR(0, 818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wait)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 2); __PYX_ERR(0, 818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 3); __PYX_ERR(0, 818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setChannelRequestPolicyGet") < 0)) __PYX_ERR(0, 818, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_when = ((ChannelWhenToFlushSendBufferPolicyKind)__Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L3_error) + __pyx_v_wait = ((ChannelWaitForResponsePolicyKind)__Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L3_error) + __pyx_v_method = ((ChannelRequestPolicyKind)__Pyx_PyInt_As_ChannelRequestPolicyKind(values[3])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L3_error) + __pyx_v_cb = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 818, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setChannelRequestPolicyGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_62setChannelRequestPolicyGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_when, __pyx_v_wait, __pyx_v_method, __pyx_v_cb); + + /* "PyCafe.pyx":818 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_62setChannelRequestPolicyGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelWhenToFlushSendBufferPolicyKind __pyx_v_when, ChannelWaitForResponsePolicyKind __pyx_v_wait, ChannelRequestPolicyKind __pyx_v_method, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED PyObject *__pyx_v_handle = NULL; + ChannelRequestPolicy __pyx_v_crp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + __Pyx_RefNannySetupContext("setChannelRequestPolicyGet", 0); + + /* "PyCafe.pyx":823 + * ChannelRequestPolicyKind method, cb: object = None): + * + * cdef str _METHOD = "setChannelRequestPolicyGet" # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_setChannelRequestPolicyGet); + __pyx_v__METHOD = __pyx_n_u_setChannelRequestPolicyGet; + + /* "PyCafe.pyx":825 + * cdef str _METHOD = "setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":826 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":825 + * cdef str _METHOD = "setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":827 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":828 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":827 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":830 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":831 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":830 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 830, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":837 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * if when: + * crp.setWhenToFlushSendBuffer(when) + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 837, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_9, __pyx_v_crp)); + + /* "PyCafe.pyx":838 + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: # <<<<<<<<<<<<<< + * crp.setWhenToFlushSendBuffer(when) + * if wait: + */ + if (__pyx_v_when) { + + /* "PyCafe.pyx":839 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: + * crp.setWhenToFlushSendBuffer(when) # <<<<<<<<<<<<<< + * if wait: + * crp.setWaitKind(wait) + */ + __pyx_v_crp.setWhenToFlushSendBuffer(__pyx_v_when); + + /* "PyCafe.pyx":838 + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * if when: # <<<<<<<<<<<<<< + * crp.setWhenToFlushSendBuffer(when) + * if wait: + */ + } + + /* "PyCafe.pyx":840 + * if when: + * crp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * crp.setWaitKind(wait) + * if method: + */ + if (__pyx_v_wait) { + + /* "PyCafe.pyx":841 + * crp.setWhenToFlushSendBuffer(when) + * if wait: + * crp.setWaitKind(wait) # <<<<<<<<<<<<<< + * if method: + * crp.setMethodKind(method) + */ + __pyx_v_crp.setWaitKind(__pyx_v_wait); + + /* "PyCafe.pyx":840 + * if when: + * crp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * crp.setWaitKind(wait) + * if method: + */ + } + + /* "PyCafe.pyx":842 + * if wait: + * crp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * crp.setMethodKind(method) + * if cb is not None: + */ + if (__pyx_v_method) { + + /* "PyCafe.pyx":843 + * crp.setWaitKind(wait) + * if method: + * crp.setMethodKind(method) # <<<<<<<<<<<<<< + * if cb is not None: + * crp.setPyHandlerGet( cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_v_crp.setMethodKind(__pyx_v_method); + + /* "PyCafe.pyx":842 + * if wait: + * crp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * crp.setMethodKind(method) + * if cb is not None: + */ + } + + /* "PyCafe.pyx":844 + * if method: + * crp.setMethodKind(method) + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerGet( cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":845 + * crp.setMethodKind(method) + * if cb is not None: + * crp.setPyHandlerGet( cb) # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + */ + __pyx_v_crp.setPyHandlerGet(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":844 + * if method: + * crp.setMethodKind(method) + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerGet( cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * + */ + } + + /* "PyCafe.pyx":847 + * crp.setPyHandlerGet( cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ################################################################################ + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_9, __pyx_v_crp)); + + /* "PyCafe.pyx":848 + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ################################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":818 + * + * ############################################################################ + * def setChannelRequestPolicyGet( # <<<<<<<<<<<<<< + * self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, + * ChannelWaitForResponsePolicyKind wait, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.setChannelRequestPolicyGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":854 + * + * + * def initCallbackComplete(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "initCallbackComplete" + * cdef vector[unsigned int] hList + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65initCallbackComplete(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65initCallbackComplete(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initCallbackComplete (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_64initCallbackComplete(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_64initCallbackComplete(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("initCallbackComplete", 0); + + /* "PyCafe.pyx":855 + * + * def initCallbackComplete(self, handlePV): + * cdef str _METHOD = "initCallbackComplete" # <<<<<<<<<<<<<< + * cdef vector[unsigned int] hList + * + */ + __Pyx_INCREF(__pyx_n_u_initCallbackComplete); + __pyx_v__METHOD = __pyx_n_u_initCallbackComplete; + + /* "PyCafe.pyx":858 + * cdef vector[unsigned int] hList + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":859 + * + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): # <<<<<<<<<<<<<< + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 859, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":860 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":861 + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.getHandleFromPV(handlePV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 861, __pyx_L1_error) + } + + /* "PyCafe.pyx":860 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":862 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":863 + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.getHandleFromPV(handlePV[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandleFromPV); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 863, __pyx_L1_error) + } + + /* "PyCafe.pyx":862 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":865 + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be of type if handle" + + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":866 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("List input arguments, should be of type if handle" + + * "else if pvname"))) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o_2}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o_2}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o_2); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":865 + * hList.push_back(self.getHandleFromPV(handlePV[i])) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("List input arguments, should be of type if handle" + + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 865, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":869 + * ("List input arguments, should be of type if handle" + + * "else if pvname"))) + * return self._c_cafe.initCallbackCompleteV(hList) # <<<<<<<<<<<<<< + * + * elif isinstance(handlePV, (int, long)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->initCallbackCompleteV(__pyx_v_hList)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":858 + * cdef vector[unsigned int] hList + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":871 + * return self._c_cafe.initCallbackCompleteV(hList) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":872 + * + * elif isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":871 + * return self._c_cafe.initCallbackCompleteV(hList) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":873 + * elif isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":874 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_handle = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":873 + * elif isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":876 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Input argument should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":877 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("Input argument should be of type if handle," + + * "else if pvname"))) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type_2}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_should_be_of_type_2}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_should_be_of_type_2); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_should_be_of_type_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_Input_argument_should_be_of_type_2); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":876 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("Input argument should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 876, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":882 + * + * #print("cb complete", self._c_cafe.initCallbackCompleteHandle(handle)) + * return self._c_cafe.initCallbackCompleteHandle(handle) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->initCallbackCompleteHandle(__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":854 + * + * + * def initCallbackComplete(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "initCallbackComplete" + * cdef vector[unsigned int] hList + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.initCallbackComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":886 + * + * ############################################################################ + * def setCallbackGet(self, handlePV, object cb = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackGet" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCallbackGet (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallbackGet") < 0)) __PYX_ERR(0, 886, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCallbackGet", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 886, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_66setCallbackGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_66setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + ChannelRequestPolicy __pyx_v_crp; + CYTHON_UNUSED PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setCallbackGet", 0); + + /* "PyCafe.pyx":888 + * def setCallbackGet(self, handlePV, object cb = None): + * + * cdef str _METHOD = "setCallbackGet" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy crp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackGet); + __pyx_v__METHOD = __pyx_n_u_setCallbackGet; + + /* "PyCafe.pyx":891 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 891, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":893 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_3 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":894 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":893 + * self.ph.getChannelRequestPolicyGet(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":895 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":896 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":895 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":898 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":899 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":898 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 898, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":903 + * else if PV")) + * + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerGet(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":904 + * + * if cb is not None: + * crp.setPyHandlerGet(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_crp.setPyHandlerGet(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":903 + * else if PV")) + * + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerGet(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":906 + * crp.setPyHandlerGet(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + */ + /*else*/ { + __pyx_v_crp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":908 + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":909 + * + * self.ph.setChannelRequestPolicyGet(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":886 + * + * ############################################################################ + * def setCallbackGet(self, handlePV, object cb = None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackGet" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":913 + * + * ############################################################################ + * def setCallbackPut(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackPut" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCallbackPut (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCallbackPut") < 0)) __PYX_ERR(0, 913, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCallbackPut", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 913, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_68setCallbackPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD = 0; + ChannelRequestPolicy __pyx_v_crp; + CYTHON_UNUSED PyObject *__pyx_v_handle = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setCallbackPut", 0); + + /* "PyCafe.pyx":915 + * def setCallbackPut(self, handlePV, object cb=None): + * + * cdef str _METHOD = "setCallbackPut" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy crp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackPut); + __pyx_v__METHOD = __pyx_n_u_setCallbackPut; + + /* "PyCafe.pyx":918 + * + * cdef ChannelRequestPolicy crp + * self.ph.getChannelRequestPolicyPut(handlePV, crp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 918, __pyx_L1_error) + (void)(__pyx_v_self->ph.getChannelRequestPolicyPut(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":920 + * self.ph.getChannelRequestPolicyPut(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_3 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":921 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":920 + * self.ph.getChannelRequestPolicyPut(handlePV, crp) + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":922 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":923 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":922 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":925 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":926 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":925 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 925, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":930 + * else if PV")) + * + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerPut(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + __pyx_t_2 = (__pyx_v_cb != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":931 + * + * if cb is not None: + * crp.setPyHandlerPut(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_crp.setPyHandlerPut(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":930 + * else if PV")) + * + * if cb is not None: # <<<<<<<<<<<<<< + * crp.setPyHandlerPut(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":933 + * crp.setPyHandlerPut(cb) # forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) + */ + /*else*/ { + __pyx_v_crp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":935 + * crp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L1_error) + (void)(__pyx_v_self->ph.setChannelRequestPolicyPut(__pyx_t_1, __pyx_v_crp)); + + /* "PyCafe.pyx":936 + * + * self.ph.setChannelRequestPolicyPut(handlePV, crp) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":913 + * + * ############################################################################ + * def setCallbackPut(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCallbackPut" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setCallbackPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handle); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":940 + * + * ############################################################################ + * def setTimeout(self, timeout): # <<<<<<<<<<<<<< + * return self.ph.setTimeout(timeout) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71setTimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71setTimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setTimeout (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_70setTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70setTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("setTimeout", 0); + + /* "PyCafe.pyx":941 + * ############################################################################ + * def setTimeout(self, timeout): + * return self.ph.setTimeout(timeout) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 941, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setTimeout(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":940 + * + * ############################################################################ + * def setTimeout(self, timeout): # <<<<<<<<<<<<<< + * return self.ph.setTimeout(timeout) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.setTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":945 + * + * ############################################################################ + * def getTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeoutGet (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_72getTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getTimeoutGet", 0); + + /* "PyCafe.pyx":947 + * def getTimeoutGet(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":948 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":949 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p, g) + * minValue = g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":950 + * p = 0 + * g = 0 + * self.ph.getTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = g + * self.ph.getTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":951 + * g = 0 + * self.ph.getTimeoutMin(p, g) + * minValue = g # <<<<<<<<<<<<<< + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":952 + * self.ph.getTimeoutMin(p, g) + * minValue = g + * self.ph.getTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":953 + * minValue = g + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + __pyx_t_1 = ((__pyx_v_g < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":954 + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): + * minValue = g # <<<<<<<<<<<<<< + * return minValue + * ############################################################################ + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":953 + * minValue = g + * self.ph.getTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + } + + /* "PyCafe.pyx":955 + * if (g < minValue): + * minValue = g + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":945 + * + * ############################################################################ + * def getTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeoutGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":960 + * ############################################################################ + * + * def getTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeoutPut (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_74getTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getTimeoutPut", 0); + + /* "PyCafe.pyx":962 + * def getTimeoutPut(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":963 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":964 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p, g) + * minValue = p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":965 + * p = 0 + * g = 0 + * self.ph.getTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = p + * self.ph.getTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":966 + * g = 0 + * self.ph.getTimeoutMin(p, g) + * minValue = p # <<<<<<<<<<<<<< + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":967 + * self.ph.getTimeoutMin(p, g) + * minValue = p + * self.ph.getTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":968 + * minValue = p + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + __pyx_t_1 = ((__pyx_v_p < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":969 + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): + * minValue = g # <<<<<<<<<<<<<< + * return minValue + * ############################################################################ + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":968 + * minValue = p + * self.ph.getTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = g + * return minValue + */ + } + + /* "PyCafe.pyx":970 + * if (p < minValue): + * minValue = g + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":960 + * ############################################################################ + * + * def getTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeoutPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":975 + * ############################################################################ + * + * def setSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * return self.ph.setSelfGoverningTimeout(b) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSelfGoverningTimeout (wrapper)", 0); + assert(__pyx_arg_b); { + __pyx_v_b = __Pyx_PyObject_IsTrue(__pyx_arg_b); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_76setSelfGoverningTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_b)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":976 + * + * def setSelfGoverningTimeout(self, bint b): + * return self.ph.setSelfGoverningTimeout(b) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setSelfGoverningTimeout(__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":975 + * ############################################################################ + * + * def setSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * return self.ph.setSelfGoverningTimeout(b) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":982 + * # Synchronous Groups + * ############################################################################ + * def setSGTimeout(self, double timeout): # <<<<<<<<<<<<<< + * return self.ph.setSGTimeout(timeout) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSGTimeout (wrapper)", 0); + assert(__pyx_arg_timeout); { + __pyx_v_timeout = __pyx_PyFloat_AsDouble(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 982, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSGTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_78setSGTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((double)__pyx_v_timeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_78setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSGTimeout", 0); + + /* "PyCafe.pyx":983 + * ############################################################################ + * def setSGTimeout(self, double timeout): + * return self.ph.setSGTimeout(timeout) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setSGTimeout(__pyx_v_timeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":982 + * # Synchronous Groups + * ############################################################################ + * def setSGTimeout(self, double timeout): # <<<<<<<<<<<<<< + * return self.ph.setSGTimeout(timeout) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSGTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":987 + * + * ############################################################################ + * def getSGTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81getSGTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81getSGTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSGTimeoutGet (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_80getSGTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_80getSGTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getSGTimeoutGet", 0); + + /* "PyCafe.pyx":989 + * def getSGTimeoutGet(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":990 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":991 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p, g) + * minValue = g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":992 + * p = 0 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":993 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + * minValue = g # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":994 + * self.ph.getSGTimeoutMin(p, g) + * minValue = g + * self.ph.getSGTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue = g + */ + (void)(__pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":995 + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * + */ + __pyx_t_1 = ((__pyx_v_g < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":996 + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): + * minValue = g # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":995 + * minValue = g + * self.ph.getSGTimeoutMax(p, g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue = g + * + */ + } + + /* "PyCafe.pyx":998 + * minValue = g + * + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":987 + * + * ############################################################################ + * def getSGTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getSGTimeoutGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1002 + * + * ############################################################################ + * def getSGTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83getSGTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83getSGTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getSGTimeoutPut (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_82getSGTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82getSGTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + double __pyx_v_minValue; + double __pyx_v_p; + double __pyx_v_g; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getSGTimeoutPut", 0); + + /* "PyCafe.pyx":1004 + * def getSGTimeoutPut(self): + * cdef double minValue, p, g + * minValue = 0 # <<<<<<<<<<<<<< + * p = 0 + * g = 0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":1005 + * cdef double minValue, p, g + * minValue = 0 + * p = 0 # <<<<<<<<<<<<<< + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":1006 + * minValue = 0 + * p = 0 + * g = 0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p, g) + * minValue = p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":1007 + * p = 0 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) # <<<<<<<<<<<<<< + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + */ + (void)(__pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":1008 + * g = 0 + * self.ph.getSGTimeoutMin(p, g) + * minValue = p # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":1009 + * self.ph.getSGTimeoutMin(p, g) + * minValue = p + * self.ph.getSGTimeoutMax(p, g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue = p + */ + (void)(__pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g)); + + /* "PyCafe.pyx":1010 + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = p + * + */ + __pyx_t_1 = ((__pyx_v_p < __pyx_v_minValue) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1011 + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): + * minValue = p # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":1010 + * minValue = p + * self.ph.getSGTimeoutMax(p, g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue = p + * + */ + } + + /* "PyCafe.pyx":1013 + * minValue = p + * + * return minValue # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1002 + * + * ############################################################################ + * def getSGTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue, p, g + * minValue = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getSGTimeoutPut", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1017 + * + * ############################################################################ + * def setSGSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setSGSelfGoverningTimeout (wrapper)", 0); + assert(__pyx_arg_b); { + __pyx_v_b = __Pyx_PyObject_IsTrue(__pyx_arg_b); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setSGSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_84setSGSelfGoverningTimeout(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_b)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84setSGSelfGoverningTimeout(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b) { + PolicyHelper __pyx_v_ph; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("setSGSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":1019 + * def setSGSelfGoverningTimeout(self, bint b): + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ph.setSGSelfGoverningTimeout(__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1017 + * + * ############################################################################ + * def setSGSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.setSGSelfGoverningTimeout", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1024 + * ############################################################################ + * + * def getContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getContext" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87getContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87getContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getContext (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_86getContext(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_86getContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("getContext", 0); + + /* "PyCafe.pyx":1025 + * + * def getContext(self, handlePV): + * cdef str _METHOD = "getContext" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getContext); + __pyx_v__METHOD = __pyx_n_u_getContext; + + /* "PyCafe.pyx":1027 + * cdef str _METHOD = "getContext" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1028 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1029 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * return < long > self.hh.getContextFromPV(handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getContextFromHandle(__pyx_t_4))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1028 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1030 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromPV(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1031 + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): + * return < long > self.hh.getContextFromPV(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_handlePV); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getContextFromPV(__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1030 + * if isinstance(handlePV, (int, long)): + * return < long > self.hh.getContextFromHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return < long > self.hh.getContextFromPV(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1033 + * return < long > self.hh.getContextFromPV(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='TypeError', _source=_METHOD, + * _error_info=( + */ + /*else*/ { + + /* "PyCafe.pyx":1034 + * else: + * _cafeException = CafeException( + * _type='TypeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=( + * "First input argument should be of type if handle, " + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_TypeError) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_4) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + + /* "PyCafe.pyx":1033 + * return < long > self.hh.getContextFromPV(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='TypeError', _source=_METHOD, + * _error_info=( + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1038 + * "First input argument should be of type if handle, " + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 1038, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1024 + * ############################################################################ + * + * def getContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getContext" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1043 + * ############################################################################ + * + * def attachContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "attachContext" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89attachContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89attachContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("attachContext (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_88attachContext(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88attachContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + char const *__pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("attachContext", 0); + + /* "PyCafe.pyx":1044 + * + * def attachContext(self, handlePV): + * cdef str _METHOD = "attachContext" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_attachContext); + __pyx_v__METHOD = __pyx_n_u_attachContext; + + /* "PyCafe.pyx":1046 + * cdef str _METHOD = "attachContext" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1047 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1048 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * return self._c_cafe.attachContextByPVName(handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->attachContextByHandle(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1047 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1049 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1050 + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): + * return self._c_cafe.attachContextByPVName(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_handlePV); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->attachContextByPVName(__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1049 + * if isinstance(handlePV, (int, long)): + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1052 + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1053 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1052 + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1052, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1043 + * ############################################################################ + * + * def attachContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "attachContext" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.attachContext", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1059 + * + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91collectionDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91collectionDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_cName; + std::vector __pyx_v_cMembers; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionDefine (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cName,&__pyx_n_s_cMembers,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cMembers)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("collectionDefine", 1, 2, 2, 1); __PYX_ERR(0, 1059, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collectionDefine") < 0)) __PYX_ERR(0, 1059, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_cName = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(0, 1059, __pyx_L3_error) + __pyx_v_cMembers = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1059, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("collectionDefine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1059, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.collectionDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_90collectionDefine(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_cName, __pyx_v_cMembers); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90collectionDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionDefine", 0); + + /* "PyCafe.pyx":1060 + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1061 + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionDefine(__pyx_v_cName, __pyx_v_cMembers)); + } + + /* "PyCafe.pyx":1060 + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1059 + * + * ############################################################################ + * def collectionDefine(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1064 + * + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93defineCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93defineCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_cName; + std::vector __pyx_v_cMembers; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineCollection (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cName,&__pyx_n_s_cMembers,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cMembers)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("defineCollection", 1, 2, 2, 1); __PYX_ERR(0, 1064, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "defineCollection") < 0)) __PYX_ERR(0, 1064, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_cName = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L3_error) + __pyx_v_cMembers = __pyx_convert_vector_from_py_std_3a__3a_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("defineCollection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1064, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.defineCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_92defineCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_cName, __pyx_v_cMembers); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92defineCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName, std::vector __pyx_v_cMembers) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineCollection", 0); + + /* "PyCafe.pyx":1065 + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1066 + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionDefine(__pyx_v_cName, __pyx_v_cMembers)); + } + + /* "PyCafe.pyx":1065 + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionDefine(cName, cMembers) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1064 + * + * ############################################################################ + * def defineCollection(self, const char * cName, vector[string] cMembers): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.collectionDefine(cName, cMembers) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1069 + * + * ############################################################################ + * def collectionList(self): # <<<<<<<<<<<<<< + * cdef vector[string] collectionList + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95collectionList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95collectionList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_94collectionList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_94collectionList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_collectionList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("collectionList", 0); + + /* "PyCafe.pyx":1071 + * def collectionList(self): + * cdef vector[string] collectionList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionList(collectionList) + * return collectionList + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1072 + * cdef vector[string] collectionList + * with nogil: + * self._c_cafe.collectionList(collectionList) # <<<<<<<<<<<<<< + * return collectionList + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionList(__pyx_v_collectionList)); + } + + /* "PyCafe.pyx":1071 + * def collectionList(self): + * cdef vector[string] collectionList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionList(collectionList) + * return collectionList + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1073 + * with nogil: + * self._c_cafe.collectionList(collectionList) + * return collectionList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_collectionList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1069 + * + * ############################################################################ + * def collectionList(self): # <<<<<<<<<<<<<< + * cdef vector[string] collectionList + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.collectionList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1077 + * + * ############################################################################ + * def collectionMemberList(self, const char * cName): # <<<<<<<<<<<<<< + * cdef vector[string] cMemberList + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97collectionMemberList(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97collectionMemberList(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName) { + char const *__pyx_v_cName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("collectionMemberList (wrapper)", 0); + assert(__pyx_arg_cName); { + __pyx_v_cName = __Pyx_PyObject_AsString(__pyx_arg_cName); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(0, 1077, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.collectionMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_96collectionMemberList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_cName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_96collectionMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName) { + std::vector __pyx_v_cMemberList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("collectionMemberList", 0); + + /* "PyCafe.pyx":1079 + * def collectionMemberList(self, const char * cName): + * cdef vector[string] cMemberList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1080 + * cdef vector[string] cMemberList + * with nogil: + * self._c_cafe.collectionMemberList(cName, cMemberList) # <<<<<<<<<<<<<< + * return cMemberList + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->collectionMemberList(__pyx_v_cName, __pyx_v_cMemberList)); + } + + /* "PyCafe.pyx":1079 + * def collectionMemberList(self, const char * cName): + * cdef vector[string] cMemberList + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1081 + * with nogil: + * self._c_cafe.collectionMemberList(cName, cMemberList) + * return cMemberList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_cMemberList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1077 + * + * ############################################################################ + * def collectionMemberList(self, const char * cName): # <<<<<<<<<<<<<< + * cdef vector[string] cMemberList + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.collectionMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1100 + * ############################################################################ + * + * def devicePositionMap(self, const char * collectionName): # <<<<<<<<<<<<<< + * p = [] + * d = [] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99devicePositionMap(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99devicePositionMap(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName) { + char const *__pyx_v_collectionName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("devicePositionMap (wrapper)", 0); + assert(__pyx_arg_collectionName); { + __pyx_v_collectionName = __Pyx_PyObject_AsString(__pyx_arg_collectionName); if (unlikely((!__pyx_v_collectionName) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_98devicePositionMap(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_collectionName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98devicePositionMap(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName) { + PyObject *__pyx_v_p = NULL; + PyObject *__pyx_v_d = NULL; + std::map __pyx_v_mmfs; + std::map ::iterator __pyx_v_it; + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("devicePositionMap", 0); + + /* "PyCafe.pyx":1101 + * + * def devicePositionMap(self, const char * collectionName): + * p = [] # <<<<<<<<<<<<<< + * d = [] + * cdef map[float, string] mmfs + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_p = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1102 + * def devicePositionMap(self, const char * collectionName): + * p = [] + * d = [] # <<<<<<<<<<<<<< + * cdef map[float, string] mmfs + * cdef map[float, string].iterator it + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_d = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1105 + * cdef map[float, string] mmfs + * cdef map[float, string].iterator it + * self._c_cafe.devicePositionMap(collectionName, mmfs) # <<<<<<<<<<<<<< + * it = mmfs.begin() + * tup = () # tuple + */ + (void)(__pyx_v_self->_c_cafe->devicePositionMap(__pyx_v_collectionName, __pyx_v_mmfs)); + + /* "PyCafe.pyx":1106 + * cdef map[float, string].iterator it + * self._c_cafe.devicePositionMap(collectionName, mmfs) + * it = mmfs.begin() # <<<<<<<<<<<<<< + * tup = () # tuple + * while it != mmfs.end(): + */ + __pyx_v_it = __pyx_v_mmfs.begin(); + + /* "PyCafe.pyx":1107 + * self._c_cafe.devicePositionMap(collectionName, mmfs) + * it = mmfs.begin() + * tup = () # tuple # <<<<<<<<<<<<<< + * while it != mmfs.end(): + * tup = deref(it) + */ + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_v_tup = __pyx_empty_tuple; + + /* "PyCafe.pyx":1108 + * it = mmfs.begin() + * tup = () # tuple + * while it != mmfs.end(): # <<<<<<<<<<<<<< + * tup = deref(it) + * p.append(tup[0]) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_it != __pyx_v_mmfs.end()) != 0); + if (!__pyx_t_2) break; + + /* "PyCafe.pyx":1109 + * tup = () # tuple + * while it != mmfs.end(): + * tup = deref(it) # <<<<<<<<<<<<<< + * p.append(tup[0]) + * d.append(tup[1]) + */ + __pyx_t_1 = __pyx_convert_pair_to_py_float____std_3a__3a_string((*__pyx_v_it)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_tup, __pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1110 + * while it != mmfs.end(): + * tup = deref(it) + * p.append(tup[0]) # <<<<<<<<<<<<<< + * d.append(tup[1]) + * inc(it) + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1110, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1111 + * tup = deref(it) + * p.append(tup[0]) + * d.append(tup[1]) # <<<<<<<<<<<<<< + * inc(it) + * return d, p + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1112 + * p.append(tup[0]) + * d.append(tup[1]) + * inc(it) # <<<<<<<<<<<<<< + * return d, p + * + */ + (void)((++__pyx_v_it)); + } + + /* "PyCafe.pyx":1113 + * d.append(tup[1]) + * inc(it) + * return d, p # <<<<<<<<<<<<<< + * + * def devicePositionV(self, const char * collectionName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_d); + __Pyx_GIVEREF(__pyx_v_d); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_d); + __Pyx_INCREF(__pyx_v_p); + __Pyx_GIVEREF(__pyx_v_p); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_p); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1100 + * ############################################################################ + * + * def devicePositionMap(self, const char * collectionName): # <<<<<<<<<<<<<< + * p = [] + * d = [] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_p); + __Pyx_XDECREF(__pyx_v_d); + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1115 + * return d, p + * + * def devicePositionV(self, const char * collectionName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "devicePositionV" + * # p=[] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101devicePositionV(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101devicePositionV(PyObject *__pyx_v_self, PyObject *__pyx_arg_collectionName) { + char const *__pyx_v_collectionName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("devicePositionV (wrapper)", 0); + assert(__pyx_arg_collectionName); { + __pyx_v_collectionName = __Pyx_PyObject_AsString(__pyx_arg_collectionName); if (unlikely((!__pyx_v_collectionName) && PyErr_Occurred())) __PYX_ERR(0, 1115, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_100devicePositionV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_collectionName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_100devicePositionV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_collectionName) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_dev; + std::vector __pyx_v_pos; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("devicePositionV", 0); + + /* "PyCafe.pyx":1116 + * + * def devicePositionV(self, const char * collectionName): + * cdef str _METHOD = "devicePositionV" # <<<<<<<<<<<<<< + * # p=[] + * # d=[] + */ + __Pyx_INCREF(__pyx_n_u_devicePositionV); + __pyx_v__METHOD = __pyx_n_u_devicePositionV; + + /* "PyCafe.pyx":1121 + * cdef vector[string] dev + * cdef vector[float] pos + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->devicePositionV(__pyx_v_collectionName, __pyx_v_dev, __pyx_v_pos); + + /* "PyCafe.pyx":1123 + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1124 + * + * if status != ICAFE_NORMAL: + * raise Exception("{} {} {} {} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__44, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":1126 + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) # <<<<<<<<<<<<<< + * + * # for i in range (0, dev.size()): + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_status_4, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_status_4, __pyx_t_4, __pyx_t_5, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_status_4); + __Pyx_GIVEREF(__pyx_kp_u_status_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_status_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_8, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_8, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1124 + * + * if status != ICAFE_NORMAL: + * raise Exception("{} {} {} {} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "status=", status, self.cs.code(status), self.cs.code(status))) + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 1124, __pyx_L1_error) + + /* "PyCafe.pyx":1123 + * status = self._c_cafe.devicePositionV(collectionName, dev, pos) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * raise Exception("{} {} {} {} {} {}".format( + * self._exception_text, _METHOD, + */ + } + + /* "PyCafe.pyx":1131 + * # d.append(dev[i]) + * # p.append(pos[i]) + * return dev, pos # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __pyx_convert_vector_to_py_float(__pyx_v_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1115 + * return d, p + * + * def devicePositionV(self, const char * collectionName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "devicePositionV" + * # p=[] + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.devicePositionV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1135 + * ############################################################################ + * + * def groupList(self): # <<<<<<<<<<<<<< + * cdef vector[string] gList + * # conservative guess + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103groupList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103groupList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_102groupList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_102groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_gList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("groupList", 0); + + /* "PyCafe.pyx":1138 + * cdef vector[string] gList + * # conservative guess + * gList.reserve(36) # <<<<<<<<<<<<<< + * + * self._c_cafe.groupList(gList) + */ + __pyx_v_gList.reserve(36); + + /* "PyCafe.pyx":1140 + * gList.reserve(36) + * + * self._c_cafe.groupList(gList) # <<<<<<<<<<<<<< + * + * # Place in list to avoid this warning: + */ + (void)(__pyx_v_self->_c_cafe->groupList(__pyx_v_gList)); + + /* "PyCafe.pyx":1147 + * # for i in range (0, len(gList)): + * # gl.append(gList[i]) + * return gList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_gList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1135 + * ############################################################################ + * + * def groupList(self): # <<<<<<<<<<<<<< + * cdef vector[string] gList + * # conservative guess + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.groupList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1150 + * ############################################################################ + * + * def getDataTypeNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getDataTypeNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getDataTypeNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeNative (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_104getDataTypeNative(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_104getDataTypeNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_ndt; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeNative", 0); + + /* "PyCafe.pyx":1151 + * + * def getDataTypeNative(self, handlePV): + * cdef str _METHOD = "getDataTypeNative" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeNative); + __pyx_v__METHOD = __pyx_n_u_getDataTypeNative; + + /* "PyCafe.pyx":1152 + * def getDataTypeNative(self, handlePV): + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1153 + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1154 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1153 + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1155 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1156 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1155 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1158 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1159 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1158 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1158, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1163 + * else if PV")) + * + * cdef long ndt = -1 # <<<<<<<<<<<<<< + * + * self.hh.getDataTypeNative(handle, ndt) + */ + __pyx_v_ndt = -1L; + + /* "PyCafe.pyx":1165 + * cdef long ndt = -1 + * + * self.hh.getDataTypeNative(handle, ndt) # <<<<<<<<<<<<<< + * return ndt + * + */ + (void)(__pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_ndt)); + + /* "PyCafe.pyx":1166 + * + * self.hh.getDataTypeNative(handle, ndt) + * return ndt # <<<<<<<<<<<<<< + * + * def getDataTypeRequest(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_ndt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1150 + * ############################################################################ + * + * def getDataTypeNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeNative" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeNative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1168 + * return ndt + * + * def getDataTypeRequest(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getDataTypeRequest(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getDataTypeRequest(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeRequest (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_106getDataTypeRequest(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_106getDataTypeRequest(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_rdt; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeRequest", 0); + + /* "PyCafe.pyx":1169 + * + * def getDataTypeRequest(self, handlePV): + * cdef str _METHOD = "getDataTypeRequest" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeRequest); + __pyx_v__METHOD = __pyx_n_u_getDataTypeRequest; + + /* "PyCafe.pyx":1170 + * def getDataTypeRequest(self, handlePV): + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1171 + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1172 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1171 + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1173 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1174 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1173 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1176 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle,\ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1177 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle,\ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_5}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_5}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_5); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_5); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_5); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1176 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle,\ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1176, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1181 + * else if PV")) + * + * cdef long rdt = -1 # <<<<<<<<<<<<<< + * self.hh.getDataTypeRequest(handle, rdt) + * return rdt + */ + __pyx_v_rdt = -1L; + + /* "PyCafe.pyx":1182 + * + * cdef long rdt = -1 + * self.hh.getDataTypeRequest(handle, rdt) # <<<<<<<<<<<<<< + * return rdt + * + */ + (void)(__pyx_v_self->hh.getDataTypeRequest(__pyx_v_handle, __pyx_v_rdt)); + + /* "PyCafe.pyx":1183 + * cdef long rdt = -1 + * self.hh.getDataTypeRequest(handle, rdt) + * return rdt # <<<<<<<<<<<<<< + * + * def getMonitorIDInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_rdt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1168 + * return ndt + * + * def getDataTypeRequest(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeRequest" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeRequest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1185 + * return rdt + * + * def getMonitorIDInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_108getMonitorIDInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_108getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getMonitorIDInCallback", 0); + + /* "PyCafe.pyx":1186 + * + * def getMonitorIDInCallback(self, handlePV): + * cdef str _METHOD = "getMonitorIDInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getMonitorIDInCallback); + __pyx_v__METHOD = __pyx_n_u_getMonitorIDInCallback; + + /* "PyCafe.pyx":1187 + * def getMonitorIDInCallback(self, handlePV): + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1188 + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1189 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1188 + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1190 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1191 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1190 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1193 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1194 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1193 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1193, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1197 + * "First input argument, should be of type if handle, \ + * else if PV")) + * return self.hh.getUsrArgsAsUInt(handle) # <<<<<<<<<<<<<< + * + * def getDataTypeInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getUsrArgsAsUInt(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1185 + * return rdt + * + * def getMonitorIDInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getMonitorIDInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorIDInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1199 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_110getDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_110getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDataTypeInCallback", 0); + + /* "PyCafe.pyx":1200 + * + * def getDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDataTypeInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDataTypeInCallback); + __pyx_v__METHOD = __pyx_n_u_getDataTypeInCallback; + + /* "PyCafe.pyx":1201 + * def getDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1202 + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1203 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1202 + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1204 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1205 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1204 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1207 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1208 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1207 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1207, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1211 + * "First input argument, should be of type if handle, \ + * else if PV")) + * return < long > self.hh.getDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrDataTypeInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDataTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1199 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1213 + * return < long > self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_112getDbrDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_112getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback", 0); + + /* "PyCafe.pyx":1214 + * + * def getDbrDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDbrDataTypeInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDbrDataTypeInCallback); + __pyx_v__METHOD = __pyx_n_u_getDbrDataTypeInCallback; + + /* "PyCafe.pyx":1215 + * def getDbrDataTypeInCallback(self, handlePV): + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1216 + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1217 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1216 + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1218 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1219 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1218 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1221 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1222 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1221 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1221, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1225 + * ("First input argument, should be of type if handle," + + * "else if PV"))) + * return < long > self.hh.getDbrDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrBaseInCallback(self, handlePV): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDbrDataTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1213 + * return < long > self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrDataTypeInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1227 + * return < long > self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrBaseInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_114getDbrBaseInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_114getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("getDbrBaseInCallback", 0); + + /* "PyCafe.pyx":1228 + * + * def getDbrBaseInCallback(self, handlePV): + * cdef str _METHOD = "getDbrBaseInCallback" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getDbrBaseInCallback); + __pyx_v__METHOD = __pyx_n_u_getDbrBaseInCallback; + + /* "PyCafe.pyx":1229 + * def getDbrBaseInCallback(self, handlePV): + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1230 + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1231 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1230 + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1232 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1233 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1232 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1235 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1236 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1235 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1235, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1239 + * ("First input argument, should be of type if handle," + + * "else if PV"))) + * return < unsigned int > self.hh.getCafeDbrTypeCB(handle) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_self->hh.getCafeDbrTypeCB(__pyx_v_handle))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1227 + * return < long > self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDbrBaseInCallback" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrBaseInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1242 + * + * ############################################################################ + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getHandlesFromWithinGroup" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_117getHandlesFromWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_117getHandlesFromWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandlesFromWithinGroup (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_116getHandlesFromWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_gHandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_116getHandlesFromWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_groupHandle; + std::vector __pyx_v_hList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + char const *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("getHandlesFromWithinGroup", 0); + + /* "PyCafe.pyx":1244 + * def getHandlesFromWithinGroup(self, gHandleName): + * + * cdef str _METHOD = "getHandlesFromWithinGroup" # <<<<<<<<<<<<<< + * + * cdef unsigned int groupHandle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getHandlesFromWithinGroup); + __pyx_v__METHOD = __pyx_n_u_getHandlesFromWithinGroup; + + /* "PyCafe.pyx":1246 + * cdef str _METHOD = "getHandlesFromWithinGroup" + * + * cdef unsigned int groupHandle = 0 # <<<<<<<<<<<<<< + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + */ + __pyx_v_groupHandle = 0; + + /* "PyCafe.pyx":1247 + * + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_gHandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_gHandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1248 + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName # <<<<<<<<<<<<<< + * elif isinstance(gHandleName, (str)): + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_gHandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_v_groupHandle = __pyx_t_4; + + /* "PyCafe.pyx":1247 + * + * cdef unsigned int groupHandle = 0 + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1249 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_gHandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1250 + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_gHandleName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_v_groupHandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_5); + + /* "PyCafe.pyx":1249 + * if isinstance(gHandleName, (int, long)): + * groupHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1252 + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if group handle," + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1253 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if group handle," + * + "else if group name"))) + */ + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_7}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_7}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_7); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_7); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_7); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1252 + * groupHandle = self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if group handle," + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1252, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1258 + * + * cdef vector[unsigned int] hList + * hList = self.hh.getHandlesFromWithinGroupV(groupHandle) # <<<<<<<<<<<<<< + * return hList + * ############################################################################ + */ + __pyx_v_hList = __pyx_v_self->hh.getHandlesFromWithinGroupV(__pyx_v_groupHandle); + + /* "PyCafe.pyx":1259 + * cdef vector[unsigned int] hList + * hList = self.hh.getHandlesFromWithinGroupV(groupHandle) + * return hList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_hList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1242 + * + * ############################################################################ + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getHandlesFromWithinGroup" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandlesFromWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1264 + * ############################################################################ + * + * def close(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119close(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119close(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_118close(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_118close(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("close", 0); + + /* "PyCafe.pyx":1265 + * + * def close(self, handlePV): + * cdef str _METHOD = "close" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_close); + __pyx_v__METHOD = __pyx_n_u_close; + + /* "PyCafe.pyx":1266 + * def close(self, handlePV): + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1267 + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1268 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1267 + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1269 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1270 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1269 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1272 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1273 + * else: + * raise Exception("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First input argument, should be of type if handle," + + * "else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_6}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_6); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_6); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_6); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1272 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1272, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1278 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.close(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1279 + * cdef int status + * with nogil: + * status = self._c_cafe.close(handle) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_v_status = __pyx_v_self->_c_cafe->close(__pyx_v_handle); + } + + /* "PyCafe.pyx":1278 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.close(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":1281 + * status = self._c_cafe.close(handle) + * + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1264 + * ############################################################################ + * + * def close(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "close" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1284 + * + * ############################################################################ + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121closeChannels(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121closeChannels(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeChannels (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_120closeChannels(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_120closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("closeChannels", 0); + + /* "PyCafe.pyx":1286 + * def closeChannels(self): + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeChannels() + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1287 + * cdef int status + * with nogil: + * status = self._c_cafe.closeChannels() # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->closeChannels(); + } + + /* "PyCafe.pyx":1286 + * def closeChannels(self): + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeChannels() + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1288 + * with nogil: + * status = self._c_cafe.closeChannels() + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1284 + * + * ############################################################################ + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.closeChannels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1291 + * + * ############################################################################ + * def closeHandles(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeHandles" + * if not handleList: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123closeHandles(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123closeHandles(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeHandles (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_122closeHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_122closeHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + unsigned int __pyx_t_12; + __Pyx_RefNannySetupContext("closeHandles", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1292 + * ############################################################################ + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" # <<<<<<<<<<<<<< + * if not handleList: + * return ICAFE_NORMAL + */ + __Pyx_INCREF(__pyx_n_u_closeHandles); + __pyx_v__METHOD = __pyx_n_u_closeHandles; + + /* "PyCafe.pyx":1293 + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" + * if not handleList: # <<<<<<<<<<<<<< + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + */ + __pyx_t_1 = (__pyx_v_handleList != Py_None)&&(PyList_GET_SIZE(__pyx_v_handleList) != 0); + __pyx_t_2 = ((!__pyx_t_1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1294 + * cdef str _METHOD = "closeHandles" + * if not handleList: + * return ICAFE_NORMAL # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1293 + * def closeHandles(self, list handleList): + * cdef str _METHOD = "closeHandles" + * if not handleList: # <<<<<<<<<<<<<< + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + */ + } + + /* "PyCafe.pyx":1295 + * if not handleList: + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1295, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1296 + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_handleList); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_force, Py_False) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1295 + * if not handleList: + * return ICAFE_NORMAL + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1297 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1297, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1298 + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be a 'list' of of type \ + * if handles or if PVs")) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_3 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a); + PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1298, __pyx_L1_error) + + /* "PyCafe.pyx":1297 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList, force=False) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":1304 + * # Do this only to avoid compiler warnings + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * cdef int status + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1304, __pyx_L1_error) + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":1305 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * cdef int status + * with nogil: + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1305, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + try { + __pyx_v_v.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1305, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1307 + * v.push_back(handleList[i]) + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeHandlesV(v) + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1308 + * cdef int status + * with nogil: + * status = self._c_cafe.closeHandlesV(v) # <<<<<<<<<<<<<< + * return status + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->closeHandlesV(__pyx_v_v); + } + + /* "PyCafe.pyx":1307 + * v.push_back(handleList[i]) + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.closeHandlesV(v) + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":1309 + * with nogil: + * status = self._c_cafe.closeHandlesV(v) + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1291 + * + * ############################################################################ + * def closeHandles(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeHandles" + * if not handleList: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.closeHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1313 + * ############################################################################ + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" + * cdef vector[unsigned int] hList + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125closeDisconnectedChannelsWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125closeDisconnectedChannelsWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeDisconnectedChannelsWithinGroup (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_124closeDisconnectedChannelsWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_124closeDisconnectedChannelsWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("closeDisconnectedChannelsWithinGroup", 0); + + /* "PyCafe.pyx":1314 + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" # <<<<<<<<<<<<<< + * cdef vector[unsigned int] hList + * cdef vector[unsigned int] disHandles + */ + __Pyx_INCREF(__pyx_n_u_closeDisconnectedChannelsWithinG); + __pyx_v__METHOD = __pyx_n_u_closeDisconnectedChannelsWithinG; + + /* "PyCafe.pyx":1318 + * cdef vector[unsigned int] disHandles + * + * if isinstance(ghandleName, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1319 + * + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): # <<<<<<<<<<<<<< + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_ghandleName); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1320 + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1321 + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) # <<<<<<<<<<<<<< + * elif isinstance(ghandleName[i], (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1321, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1321, __pyx_L1_error) + } + + /* "PyCafe.pyx":1320 + * if isinstance(ghandleName, (list)): + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1322 + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1323 + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ghandleName, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1323, __pyx_L1_error) + } + + /* "PyCafe.pyx":1322 + * if isinstance(ghandleName[i], (int, long)): + * hList.push_back(ghandleName[i]) + * elif isinstance(ghandleName[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1325 + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":1326 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1325 + * hList.push_back(self.checkForGroupHandle(ghandleName[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 1325, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":1318 + * cdef vector[unsigned int] disHandles + * + * if isinstance(ghandleName, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(ghandleName)): + * if isinstance(ghandleName[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1330 + * if group handle, else if group name")) + * + * elif isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1331 + * + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1331, __pyx_L1_error) + } + + /* "PyCafe.pyx":1330 + * if group handle, else if group name")) + * + * elif isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1332 + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1333 + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): + * hList.push_back(self.checkForGroupHandle(ghandleName)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1333, __pyx_L1_error) + } + + /* "PyCafe.pyx":1332 + * elif isinstance(ghandleName, (int, long)): + * hList.push_back(ghandleName) + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1335 + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1336 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument (if not list), should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_if_not_list); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_if_not_list); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_First_input_argument_if_not_list); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1335 + * hList.push_back(self.checkForGroupHandle(ghandleName)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1335, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1340 + * if group handle, else if group name")) + * + * for i in range(0, len(hList)): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + */ + __pyx_t_6 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_hList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1341 + * + * for i in range(0, len(hList)): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1342 + * for i in range(0, len(hList)): + * with nogil: + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( # <<<<<<<<<<<<<< + * hList[i]) + * return + */ + (void)(__pyx_v_self->_c_cafe->closeDisconnectedChannelsFromWithinGroupV((__pyx_v_hList[__pyx_v_i]))); + } + + /* "PyCafe.pyx":1341 + * + * for i in range(0, len(hList)): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + } + + /* "PyCafe.pyx":1344 + * self._c_cafe.closeDisconnectedChannelsFromWithinGroupV( + * hList[i]) + * return # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1313 + * ############################################################################ + * + * def closeDisconnectedChannelsWithinGroup(self, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeDisconnectedChannelsWithinGroup" + * cdef vector[unsigned int] hList + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.closeDisconnectedChannelsWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1347 + * + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeChannelKeepHandle" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127closeChannelKeepHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127closeChannelKeepHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("closeChannelKeepHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_126closeChannelKeepHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_126closeChannelKeepHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_hList; + int __pyx_v_statusClose; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("closeChannelKeepHandle", 0); + + /* "PyCafe.pyx":1348 + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): + * cdef str _METHOD = "closeChannelKeepHandle" # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hList + */ + __Pyx_INCREF(__pyx_n_u_closeChannelKeepHandle); + __pyx_v__METHOD = __pyx_n_u_closeChannelKeepHandle; + + /* "PyCafe.pyx":1353 + * cdef int statusClose + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1354 + * + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): # <<<<<<<<<<<<<< + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + */ + __pyx_t_3 = PyObject_Length(__pyx_v_handlePV); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":1355 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1356 + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.checkForHandle(handlePV[i])) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1356, __pyx_L1_error) + } + + /* "PyCafe.pyx":1355 + * if isinstance(handlePV, (list)): + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1357 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1358 + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): + * hList.push_back(self.checkForHandle(handlePV[i])) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_handlePV, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1358, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1358, __pyx_L1_error) + } + + /* "PyCafe.pyx":1357 + * if isinstance(handlePV[i], (int, long)): + * hList.push_back(handlePV[i]) + * elif isinstance(handlePV[i], (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1360 + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":1361 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "List input arguments, should be of type \ + * if group handle, else if group name")) + */ + __pyx_t_10 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_List_input_arguments_should_be_o}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_11 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_List_input_arguments_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_List_input_arguments_should_be_o); + PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_kp_u_List_input_arguments_should_be_o); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1360 + * hList.push_back(self.checkForHandle(handlePV[i])) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "List input arguments, should be of type \ + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 1360, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":1353 + * cdef int statusClose + * + * if isinstance(handlePV, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(handlePV)): + * if isinstance(handlePV[i], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1365 + * if group handle, else if group name")) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_1 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1366 + * + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * hList.push_back(self.checkForHandle(handlePV)) + */ + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L1_error) + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1366, __pyx_L1_error) + } + + /* "PyCafe.pyx":1365 + * if group handle, else if group name")) + * + * elif isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1367 + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV)) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1368 + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): + * hList.push_back(self.checkForHandle(handlePV)) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_hList.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1368, __pyx_L1_error) + } + + /* "PyCafe.pyx":1367 + * elif isinstance(handlePV, (int, long)): + * hList.push_back(handlePV) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * hList.push_back(self.checkForHandle(handlePV)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1370 + * hList.push_back(self.checkForHandle(handlePV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1371 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument (if not list), should be of type \ + * if handle, else if PV")) + */ + __pyx_t_11 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list_2}; + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_if_not_list_2}; + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_if_not_list_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_if_not_list_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_12, __pyx_kp_u_First_input_argument_if_not_list_2); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1370 + * hList.push_back(self.checkForHandle(handlePV)) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument (if not list), should be of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1370, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1375 + * if handle, else if PV")) + * + * with nogil: # <<<<<<<<<<<<<< + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1376 + * + * with nogil: + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) # <<<<<<<<<<<<<< + * return statusClose + * + */ + __pyx_v_statusClose = __pyx_v_self->_c_cafe->closeChannelsKeepHandles(__pyx_v_hList); + } + + /* "PyCafe.pyx":1375 + * if handle, else if PV")) + * + * with nogil: # <<<<<<<<<<<<<< + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":1377 + * with nogil: + * statusClose = self._c_cafe.closeChannelsKeepHandles(hList) + * return statusClose # <<<<<<<<<<<<<< + * + * #def reconnect(self, vector[unsigned int] handleList): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_statusClose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1347 + * + * ############################################################################ + * def closeChannelKeepHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "closeChannelKeepHandle" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.closeChannelKeepHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1380 + * + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): # <<<<<<<<<<<<<< + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129reconnect(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129reconnect(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("reconnect (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_128reconnect(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_128reconnect(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + int __pyx_v_status1; + int __pyx_v_status2; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + unsigned int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + __Pyx_RefNannySetupContext("reconnect", 0); + + /* "PyCafe.pyx":1381 + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): + * cdef int status1 = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef int status2 = ICAFE_NORMAL + * cdef vector[unsigned int] v + */ + __pyx_v_status1 = ICAFE_NORMAL; + + /* "PyCafe.pyx":1382 + * def reconnect(self, list handleList): + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) + */ + __pyx_v_status2 = ICAFE_NORMAL; + + /* "PyCafe.pyx":1384 + * cdef int status2 = ICAFE_NORMAL + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1384, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_1); + + /* "PyCafe.pyx":1385 + * cdef vector[unsigned int] v + * v.reserve(len(handleList)) + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * #print("Channels Closing...") + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1385, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":1386 + * v.reserve(len(handleList)) + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * #print("Channels Closing...") + * self.openMonitorPrepare() + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1386, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1386, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1388 + * v.push_back(handleList[i]) + * #print("Channels Closing...") + * self.openMonitorPrepare() # <<<<<<<<<<<<<< + * + * for i in range (0, len(handleList)): + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openMonitorPrepare); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1390 + * self.openMonitorPrepare() + * + * for i in range (0, len(handleList)): # <<<<<<<<<<<<<< + * self.monitorStop(handleList[i]) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1390, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":1391 + * + * for i in range (0, len(handleList)): + * self.monitorStop(handleList[i]) # <<<<<<<<<<<<<< + * + * self.openMonitorNow() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_monitorStop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1391, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":1393 + * self.monitorStop(handleList[i]) + * + * self.openMonitorNow() # <<<<<<<<<<<<<< + * time.sleep(0.05) + * #with nogil: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openMonitorNow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1394 + * + * self.openMonitorNow() + * time.sleep(0.05) # <<<<<<<<<<<<<< + * #with nogil: + * # status= self._c_cafe.reconnect(handleList) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1398 + * # status= self._c_cafe.reconnect(handleList) + * #print("Channels Closing...") + * with nogil: # <<<<<<<<<<<<<< + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1399 + * #print("Channels Closing...") + * with nogil: + * status1 = self._c_cafe.closeChannelsKeepHandles(v) # <<<<<<<<<<<<<< + * time.sleep(0.05) + * #print("Channels Closed") + */ + __pyx_v_status1 = __pyx_v_self->_c_cafe->closeChannelsKeepHandles(__pyx_v_v); + } + + /* "PyCafe.pyx":1398 + * # status= self._c_cafe.reconnect(handleList) + * #print("Channels Closing...") + * with nogil: # <<<<<<<<<<<<<< + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L9; + } + __pyx_L9:; + } + } + + /* "PyCafe.pyx":1400 + * with nogil: + * status1 = self._c_cafe.closeChannelsKeepHandles(v) + * time.sleep(0.05) # <<<<<<<<<<<<<< + * #print("Channels Closed") + * self.openPrepare() + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1402 + * time.sleep(0.05) + * #print("Channels Closed") + * self.openPrepare() # <<<<<<<<<<<<<< + * with nogil: + * status2 = self._c_cafe.openChannelsWithHandles(v) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openPrepare); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1403 + * #print("Channels Closed") + * self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * status2 = self._c_cafe.openChannelsWithHandles(v) + * #print("Channels Opened") + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1404 + * self.openPrepare() + * with nogil: + * status2 = self._c_cafe.openChannelsWithHandles(v) # <<<<<<<<<<<<<< + * #print("Channels Opened") + * + */ + __pyx_v_status2 = __pyx_v_self->_c_cafe->openChannelsWithHandles(__pyx_v_v); + } + + /* "PyCafe.pyx":1403 + * #print("Channels Closed") + * self.openPrepare() + * with nogil: # <<<<<<<<<<<<<< + * status2 = self._c_cafe.openChannelsWithHandles(v) + * #print("Channels Opened") + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":1407 + * #print("Channels Opened") + * + * self.openNowAndWait(self._c_cafe.channelOpenPolicy.getTimeout(), v) # <<<<<<<<<<<<<< + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNowAndWait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->_c_cafe->channelOpenPolicy.getTimeout()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_v); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_10 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + #endif + { + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1409 + * self.openNowAndWait(self._c_cafe.channelOpenPolicy.getTimeout(), v) + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) # <<<<<<<<<<<<<< + * return max(status1, status2) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_float_0_05) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_float_0_05); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1410 + * #print("Channels Opened//", status1, status2) + * time.sleep(0.05) + * return max(status1, status2) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_v_status2; + __pyx_t_12 = __pyx_v_status1; + if (((__pyx_t_10 > __pyx_t_12) != 0)) { + __pyx_t_13 = __pyx_t_10; + } else { + __pyx_t_13 = __pyx_t_12; + } + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1380 + * + * #def reconnect(self, vector[unsigned int] handleList): + * def reconnect(self, list handleList): # <<<<<<<<<<<<<< + * cdef int status1 = ICAFE_NORMAL + * cdef int status2 = ICAFE_NORMAL + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1414 + * ############################################################################ + * + * def allConnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.allChannelsConnected() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131allConnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131allConnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("allConnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_130allConnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_130allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("allConnected", 0); + + /* "PyCafe.pyx":1415 + * + * def allConnected(self): + * return self._c_cafe.allChannelsConnected() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_cafe->allChannelsConnected() != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1414 + * ############################################################################ + * + * def allConnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.allChannelsConnected() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.allConnected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1420 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133isConnected(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133isConnected(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isConnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_132isConnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_132isConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("isConnected", 0); + + /* "PyCafe.pyx":1421 + * @verify_handlepv + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" # <<<<<<<<<<<<<< + * return self._c_cafe.isChannelConnected(handlePV) + * + */ + __Pyx_INCREF(__pyx_n_u_isConnected); + __pyx_v__METHOD = __pyx_n_u_isConnected; + + /* "PyCafe.pyx":1422 + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_t_1) != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1420 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.isConnected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1425 + * + * ############################################################################ + * def supplementHandles(self, handleList=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135supplementHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135supplementHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandles (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "supplementHandles") < 0)) __PYX_ERR(0, 1425, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("supplementHandles", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1425, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_134supplementHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134supplementHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("supplementHandles", 0); + + /* "PyCafe.pyx":1426 + * ############################################################################ + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" # <<<<<<<<<<<<<< + * if handleList is None: + * with nogil: + */ + __Pyx_INCREF(__pyx_n_u_supplementHandles); + __pyx_v__METHOD = __pyx_n_u_supplementHandles; + + /* "PyCafe.pyx":1427 + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" + * if handleList is None: # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandles() + */ + __pyx_t_1 = (__pyx_v_handleList == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1428 + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1429 + * if handleList is None: + * with nogil: + * self._c_cafe.supplementHandles() # <<<<<<<<<<<<<< + * elif isinstance(handleList, (list)): + * #Convert to vector + */ + (void)(__pyx_v_self->_c_cafe->supplementHandles()); + } + + /* "PyCafe.pyx":1428 + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":1427 + * def supplementHandles(self, handleList=None): + * cdef str _METHOD = "supplementHandles" + * if handleList is None: # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandles() + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1430 + * with nogil: + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * #Convert to vector + * self.supplementHandlesV(handleList) + */ + __pyx_t_2 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1432 + * elif isinstance(handleList, (list)): + * #Convert to vector + * self.supplementHandlesV(handleList) # <<<<<<<<<<<<<< + * elif isinstance(handleList, (int, long, str)): + * self.supplementHandle(handleList) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_supplementHandlesV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1430 + * with nogil: + * self._c_cafe.supplementHandles() + * elif isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * #Convert to vector + * self.supplementHandlesV(handleList) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1433 + * #Convert to vector + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): # <<<<<<<<<<<<<< + * self.supplementHandle(handleList) + * else: + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handleList); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_6 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_6 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":1434 + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): + * self.supplementHandle(handleList) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_supplementHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":1433 + * #Convert to vector + * self.supplementHandlesV(handleList) + * elif isinstance(handleList, (int, long, str)): # <<<<<<<<<<<<<< + * self.supplementHandle(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1436 + * self.supplementHandle(handleList) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, if given, should be if list of \ + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":1437 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Input argument, if given, should be if list of \ + * handles or PVs, else of type if handle or if \ + */ + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_if_given_should_b}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Input_argument_if_given_should_b}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Input_argument_if_given_should_b); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_if_given_should_b); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_Input_argument_if_given_should_b); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1436 + * self.supplementHandle(handleList) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "Input argument, if given, should be if list of \ + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1436, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1425 + * + * ############################################################################ + * def supplementHandles(self, handleList=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandles" + * if handleList is None: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1444 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137supplementHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137supplementHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_136supplementHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_136supplementHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("supplementHandle", 0); + + /* "PyCafe.pyx":1446 + * def supplementHandle(self, handlePV): + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1447 + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1448 + * cdef unsigned int handle = handlePV + * with nogil: + * self._c_cafe.supplementHandle(handle) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->supplementHandle(__pyx_v_handle)); + } + + /* "PyCafe.pyx":1447 + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":1444 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1452 + * ############################################################################ + * + * def supplementHandlesV(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139supplementHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139supplementHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("supplementHandlesV (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_138supplementHandlesV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_138supplementHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_hl = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + __Pyx_RefNannySetupContext("supplementHandlesV", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1453 + * + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" # <<<<<<<<<<<<<< + * if isinstance(handleList, (str, int, long)): + * hl = [] + */ + __Pyx_INCREF(__pyx_n_u_supplementHandlesV); + __pyx_v__METHOD = __pyx_n_u_supplementHandlesV; + + /* "PyCafe.pyx":1454 + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1455 + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + * hl = [] # <<<<<<<<<<<<<< + * hl.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_hl = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1456 + * if isinstance(handleList, (str, int, long)): + * hl = [] + * hl.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = hl + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_hl, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1456, __pyx_L1_error) + + /* "PyCafe.pyx":1458 + * hl.append(handleList) + * #handleList = [] + * handleList = hl # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + */ + __Pyx_INCREF(__pyx_v_hl); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_hl); + + /* "PyCafe.pyx":1454 + * def supplementHandlesV(self, handleList): + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + } + + /* "PyCafe.pyx":1459 + * #handleList = [] + * handleList = hl + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1460 + * handleList = hl + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1459 + * #handleList = [] + * handleList = hl + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":1461 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1462 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":1463 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1462 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 1462, __pyx_L1_error) + + /* "PyCafe.pyx":1461 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":1467 + * if handles, else if PVs")) + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":1468 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1468, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1470 + * v.push_back(handleList[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandlesV(v) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1471 + * + * with nogil: + * self._c_cafe.supplementHandlesV(v) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->supplementHandlesV(__pyx_v_v)); + } + + /* "PyCafe.pyx":1470 + * v.push_back(handleList[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandlesV(v) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":1452 + * ############################################################################ + * + * def supplementHandlesV(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "supplementHandlesV" + * if isinstance(handleList, (str, int, long)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.supplementHandlesV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_hl); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1475 + * ############################################################################ + * + * def printDisconnected(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141printDisconnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141printDisconnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnected (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_140printDisconnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_140printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnected", 0); + + /* "PyCafe.pyx":1476 + * + * def printDisconnected(self): + * self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * def printDisconnectedHandles(self): + */ + (void)(__pyx_v_self->_c_cafe->printDisconnectedHandles()); + + /* "PyCafe.pyx":1475 + * ############################################################################ + * + * def printDisconnected(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1478 + * self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143printDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143printDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnectedHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_142printDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_142printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printDisconnectedHandles", 0); + + /* "PyCafe.pyx":1479 + * + * def printDisconnectedHandles(self): + * self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->printDisconnectedHandles()); + + /* "PyCafe.pyx":1478 + * self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printDisconnectedHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1482 + * + * ############################################################################ + * def printHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145printHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145printHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_144printHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_144printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandles", 0); + + /* "PyCafe.pyx":1483 + * ############################################################################ + * def printHandles(self): + * self._c_cafe.printHandles() # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + (void)(__pyx_v_self->_c_cafe->printHandles()); + + /* "PyCafe.pyx":1482 + * + * ############################################################################ + * def printHandles(self): # <<<<<<<<<<<<<< + * self._c_cafe.printHandles() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1487 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147printHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147printHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandle (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_146printHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_146printHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("printHandle", 0); + + /* "PyCafe.pyx":1488 + * @verify_handlepv + * def printHandle(self, handlePV): + * self._c_cafe.printHandle(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1488, __pyx_L1_error) + (void)(__pyx_v_self->_c_cafe->printHandle(__pyx_t_1)); + + /* "PyCafe.pyx":1487 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.printHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1493 + * + * ############################################################################ + * def printHandlesV(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printHandlesV (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_148printHandlesV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_handleList)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_148printHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + unsigned int __pyx_t_12; + __Pyx_RefNannySetupContext("printHandlesV", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1494 + * ############################################################################ + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" # <<<<<<<<<<<<<< + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + */ + __Pyx_INCREF(__pyx_n_u_printHandlesV); + __pyx_v__METHOD = __pyx_n_u_printHandlesV; + + /* "PyCafe.pyx":1495 + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1495, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1496 + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1496, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1495 + * def printHandlesV(self, list handleList): + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1497 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1497, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_Check(__pyx_t_1); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_3 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_1); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1498 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":1499 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_input_argument_should_be_a_3); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1498 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be a 'list' of of type \ + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1498, __pyx_L1_error) + + /* "PyCafe.pyx":1497 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":1505 + * # Do this only to avoid compiler warnings + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1505, __pyx_L1_error) + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":1506 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * self.hh.printHandlesV(v) + * return + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1506, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 1506, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":1507 + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) # <<<<<<<<<<<<<< + * return + * ############################################################################ + */ + (void)(__pyx_v_self->hh.printHandlesV(__pyx_v_v)); + + /* "PyCafe.pyx":1508 + * v.push_back(handleList[i]) + * self.hh.printHandlesV(v) + * return # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":1493 + * + * ############################################################################ + * def printHandlesV(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "printHandlesV" + * if isinstance(handleList[0], (str)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.printHandlesV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1512 + * + * ############################################################################ + * def getDisconnectedHandles(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDisconnectedHandles (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_150getDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_150getDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("getDisconnectedHandles", 0); + + /* "PyCafe.pyx":1515 + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + * self.hh.getDisconnectedHandles(dhV, pvV) # <<<<<<<<<<<<<< + * return dhV, pvV + * ############################################################################ + */ + (void)(__pyx_v_self->hh.getDisconnectedHandles(__pyx_v_dhV, __pyx_v_pvV)); + + /* "PyCafe.pyx":1516 + * cdef vector[string] pvV + * self.hh.getDisconnectedHandles(dhV, pvV) + * return dhV, pvV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1512 + * + * ############################################################################ + * def getDisconnectedHandles(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.getDisconnectedHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1521 + * ############################################################################ + * + * def getHandles(self, asDict=False): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getHandles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_asDict = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandles (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asDict,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asDict); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandles") < 0)) __PYX_ERR(0, 1521, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_asDict = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getHandles", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1521, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_152getHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_asDict); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_152getHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_asDict) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getHandles", 0); + + /* "PyCafe.pyx":1524 + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) # <<<<<<<<<<<<<< + * if asDict: + * return dict(zip(dhV, pvV)) + */ + (void)(__pyx_v_self->hh.getHandles(__pyx_v_dhV, __pyx_v_pvV)); + + /* "PyCafe.pyx":1525 + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) + * if asDict: # <<<<<<<<<<<<<< + * return dict(zip(dhV, pvV)) + * else: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_asDict); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error) + if (__pyx_t_1) { + + /* "PyCafe.pyx":1526 + * self.hh.getHandles(dhV, pvV) + * if asDict: + * return dict(zip(dhV, pvV)) # <<<<<<<<<<<<<< + * else: + * return dhV, pvV + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1525 + * cdef vector[string] pvV + * self.hh.getHandles(dhV, pvV) + * if asDict: # <<<<<<<<<<<<<< + * return dict(zip(dhV, pvV)) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1528 + * return dict(zip(dhV, pvV)) + * else: + * return dhV, pvV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1521 + * ############################################################################ + * + * def getHandles(self, asDict=False): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1533 + * ############################################################################ + * + * def getHandleStates(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getHandleStates(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getHandleStates(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleStates (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_154getHandleStates(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_154getHandleStates(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_dhV; + std::vector __pyx_v_pvV; + std::vector __pyx_v_stateV; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getHandleStates", 0); + + /* "PyCafe.pyx":1537 + * cdef vector[string] pvV + * cdef vector[unsigned short] stateV + * self.hh.getHandleStates(dhV, pvV, stateV) # <<<<<<<<<<<<<< + * return dhV, pvV, stateV + * ############################################################################ + */ + (void)(__pyx_v_self->hh.getHandleStates(__pyx_v_dhV, __pyx_v_pvV, __pyx_v_stateV)); + + /* "PyCafe.pyx":1538 + * cdef vector[unsigned short] stateV + * self.hh.getHandleStates(dhV, pvV, stateV) + * return dhV, pvV, stateV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_dhV); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_convert_vector_to_py_unsigned_short(__pyx_v_stateV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1533 + * ############################################################################ + * + * def getHandleStates(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleStates", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1542 + * + * ############################################################################ + * def getStatusSeverity(self, int statusCode): # <<<<<<<<<<<<<< + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusSeverity (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_156getStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_156getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusSeverity", 0); + + /* "PyCafe.pyx":1543 + * ############################################################################ + * def getStatusSeverity(self, int statusCode): + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->_c_cafe->getCafeStatusSeverity().message(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1542 + * + * ############################################################################ + * def getStatusSeverity(self, int statusCode): # <<<<<<<<<<<<<< + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1546 + * + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusCodeAsText (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1546, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsText", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_158getStatusCodeAsText(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_158getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusCodeAsText", 0); + + /* "PyCafe.pyx":1547 + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): + * return self.cs.code(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1546 + * + * ############################################################################ + * def getStatusCodeAsText(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsText", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1550 + * + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getStatusCodeAsString(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getStatusCodeAsString(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusCodeAsString (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1550, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_160getStatusCodeAsString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_160getStatusCodeAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusCodeAsString", 0); + + /* "PyCafe.pyx":1551 + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): + * return self.cs.code(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1550 + * + * ############################################################################ + * def getStatusCodeAsString(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusCodeAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1554 + * + * ############################################################################ + * def getStatusInfo(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.info(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusInfo (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_162getStatusInfo(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_162getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusInfo", 0); + + /* "PyCafe.pyx":1555 + * ############################################################################ + * def getStatusInfo(self, int statusCode): + * return self.cs.info(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1554 + * + * ############################################################################ + * def getStatusInfo(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.info(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1558 + * + * ############################################################################ + * def getStatusMsg(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatusMsg (wrapper)", 0); + assert(__pyx_arg_statusCode); { + __pyx_v_statusCode = __Pyx_PyInt_As_int(__pyx_arg_statusCode); if (unlikely((__pyx_v_statusCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_164getStatusMsg(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_statusCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_164getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getStatusMsg", 0); + + /* "PyCafe.pyx":1559 + * ############################################################################ + * def getStatusMsg(self, int statusCode): + * return self.cs.message(statusCode) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.message(__pyx_v_statusCode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1558 + * + * ############################################################################ + * def getStatusMsg(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.message(statusCode) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatusMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1563 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getStatus(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getStatus(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStatus (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_166getStatus(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_166getStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getStatus", 0); + + /* "PyCafe.pyx":1564 + * @verify_handlepv + * def getStatus(self, handlePV): + * return self.hh.getStatus(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1563 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1567 + * + * ############################################################################ + * def getChannelDevice(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getChannelDevice(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getChannelDevice(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelDevice (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_168getChannelDevice(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_168getChannelDevice(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_valString; + unsigned int __pyx_v_handle; + PyObject *__pyx_v_delSplit = NULL; + CYTHON_UNUSED int __pyx_v_statusLocal; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::string __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("getChannelDevice", 0); + + /* "PyCafe.pyx":1568 + * ############################################################################ + * def getChannelDevice(self, handlePV): + * cdef str _METHOD = "getChannelDevice" # <<<<<<<<<<<<<< + * cdef string valString = str("") + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getChannelDevice); + __pyx_v__METHOD = __pyx_n_u_getChannelDevice; + + /* "PyCafe.pyx":1569 + * def getChannelDevice(self, handlePV): + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1569, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1570 + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1571 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_4 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1572 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) + */ + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1571 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1573 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + __pyx_t_4 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1574 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pv, __pyx_v_handlePV) < 0) __PYX_ERR(0, 1574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, Py_False) < 0) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1574, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1573 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1576 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1577 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1576 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1576, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1580 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1581 + * else if PV")) + * if handle == 0: + * valString = str("") # <<<<<<<<<<<<<< + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1582 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1583 + * valString = str("") + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") # <<<<<<<<<<<<<< + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_handlePV, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_kp_u__45) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__45); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_delSplit = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1584 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + __pyx_t_11 = PyObject_Length(__pyx_v_delSplit); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_11 > 1) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1585 + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) # <<<<<<<<<<<<<< + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_delSplit, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1584 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + } + + /* "PyCafe.pyx":1582 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + } + + /* "PyCafe.pyx":1580 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1587 + * valString = str(delSplit[0]) + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + /*else*/ { + __pyx_v_statusLocal = __pyx_v_self->hh.getChannelDevice(__pyx_v_handle, __pyx_v_valString); + } + __pyx_L6:; + + /* "PyCafe.pyx":1588 + * else: + * statusLocal = self.hh.getChannelDevice(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1567 + * + * ############################################################################ + * def getChannelDevice(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDevice" + * cdef string valString = str("") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_delSplit); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1591 + * + * ############################################################################ + * def getChannelAttribute(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171getChannelAttribute(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171getChannelAttribute(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelAttribute (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_170getChannelAttribute(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_170getChannelAttribute(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_valString; + unsigned int __pyx_v_handle; + PyObject *__pyx_v_delSplit = NULL; + CYTHON_UNUSED int __pyx_v_statusLocal; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + std::string __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("getChannelAttribute", 0); + + /* "PyCafe.pyx":1592 + * ############################################################################ + * def getChannelAttribute(self, handlePV): + * cdef str _METHOD = "getChannelAttribute" # <<<<<<<<<<<<<< + * cdef string valString = str("") + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getChannelAttribute); + __pyx_v__METHOD = __pyx_n_u_getChannelAttribute; + + /* "PyCafe.pyx":1593 + * def getChannelAttribute(self, handlePV): + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1594 + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1595 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_5 = (__pyx_t_4 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_3 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1596 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) + */ + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1595 + * cdef string valString = str("") + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1597 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + __pyx_t_4 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1598 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(pv=handlePV, force=False) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pv, __pyx_v_handlePV) < 0) __PYX_ERR(0, 1598, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, Py_False) < 0) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1598, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_handle = __pyx_t_6; + + /* "PyCafe.pyx":1597 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1600 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1601 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument, should be of type if handle, \ + * else if PV")) + */ + __pyx_t_1 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_3}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_3); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_3); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1600 + * handle = self.checkForHandle(pv=handlePV, force=False) + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument, should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1600, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1604 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1605 + * else if PV")) + * if handle == 0: + * valString = str("") # <<<<<<<<<<<<<< + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1606 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1607 + * valString = str("") + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") # <<<<<<<<<<<<<< + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_handlePV, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_kp_u__45) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u__45); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_delSplit = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1608 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + __pyx_t_11 = PyObject_Length(__pyx_v_delSplit); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1608, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_11 > 1) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":1609 + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + * valString = str(delSplit[0]) # <<<<<<<<<<<<<< + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_delSplit, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valString = __pyx_t_2; + + /* "PyCafe.pyx":1608 + * if isinstance(handlePV, (str)): + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): # <<<<<<<<<<<<<< + * valString = str(delSplit[0]) + * else: + */ + } + + /* "PyCafe.pyx":1606 + * if handle == 0: + * valString = str("") + * if isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * delSplit = handlePV.split(":") + * if (len(delSplit) > 1): + */ + } + + /* "PyCafe.pyx":1604 + * "First input argument, should be of type if handle, \ + * else if PV")) + * if handle == 0: # <<<<<<<<<<<<<< + * valString = str("") + * if isinstance(handlePV, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1611 + * valString = str(delSplit[0]) + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + /*else*/ { + __pyx_v_statusLocal = __pyx_v_self->hh.getChannelAttribute(__pyx_v_handle, __pyx_v_valString); + } + __pyx_L6:; + + /* "PyCafe.pyx":1612 + * else: + * statusLocal = self.hh.getChannelAttribute(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1591 + * + * ############################################################################ + * def getChannelAttribute(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelAttribute" + * cdef string valString = str("") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_delSplit); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1617 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDescription (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_172getDescription(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_172getDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + std::string __pyx_v_valString; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("getDescription", 0); + + /* "PyCafe.pyx":1618 + * @verify_handlepv + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * if not self.hh.hasDescription(handle): + * with nogil: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1619 + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + __pyx_t_2 = ((!(__pyx_v_self->hh.hasDescription(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1620 + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * cdef string valString + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1621 + * if not self.hh.hasDescription(handle): + * with nogil: + * self._c_cafe.supplementHandle(handle) # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getDescription(handle, valString) + */ + (void)(__pyx_v_self->_c_cafe->supplementHandle(__pyx_v_handle)); + } + + /* "PyCafe.pyx":1620 + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.supplementHandle(handle) + * cdef string valString + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + + /* "PyCafe.pyx":1619 + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.supplementHandle(handle) + */ + } + + /* "PyCafe.pyx":1623 + * self._c_cafe.supplementHandle(handle) + * cdef string valString + * self.hh.getDescription(handle, valString) # <<<<<<<<<<<<<< + * return valString + * + */ + (void)(__pyx_v_self->hh.getDescription(__pyx_v_handle, __pyx_v_valString)); + + /* "PyCafe.pyx":1624 + * cdef string valString + * self.hh.getDescription(handle, valString) + * return valString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1617 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.getDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1628 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175hasDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175hasDescription(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("hasDescription (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_174hasDescription(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_174hasDescription(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("hasDescription", 0); + + /* "PyCafe.pyx":1629 + * @verify_handlepv + * def hasDescription(self, handlePV): + * return self.hh.hasDescription(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->hh.hasDescription(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1628 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.hasDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1633 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177getUnits(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177getUnits(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getUnits (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_176getUnits(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_176getUnits(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + std::string __pyx_v_valString; + PyObject *__pyx_v_bVal = 0; + PyObject *__pyx_v_unicode_units = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("getUnits", 0); + + /* "PyCafe.pyx":1635 + * def getUnits(self, handlePV): + * cdef string valString + * self.hh.getUnits(handlePV, valString) # <<<<<<<<<<<<<< + * cdef bytes bVal + * bVal = valString + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L1_error) + (void)(__pyx_v_self->hh.getUnits(__pyx_t_1, __pyx_v_valString)); + + /* "PyCafe.pyx":1637 + * self.hh.getUnits(handlePV, valString) + * cdef bytes bVal + * bVal = valString # <<<<<<<<<<<<<< + * unicode_units = (bVal).decode('latin-1') + * return unicode_units + */ + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_valString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_bVal = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":1638 + * cdef bytes bVal + * bVal = valString + * unicode_units = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * return unicode_units + * + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 1638, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_unicode_units = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":1639 + * bVal = valString + * unicode_units = (bVal).decode('latin-1') + * return unicode_units # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_unicode_units); + __pyx_r = __pyx_v_unicode_units; + goto __pyx_L0; + + /* "PyCafe.pyx":1633 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.getUnits", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XDECREF(__pyx_v_unicode_units); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getPrecision(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getPrecision(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPrecision (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_178getPrecision(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_178getPrecision(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + short __pyx_v_precision; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getPrecision", 0); + + /* "PyCafe.pyx":1644 + * @verify_handlepv + * def getPrecision(self, handlePV): + * cdef short precision = 0 # <<<<<<<<<<<<<< + * self.hh.getPrecision(handlePV, precision) + * return precision + */ + __pyx_v_precision = 0; + + /* "PyCafe.pyx":1645 + * def getPrecision(self, handlePV): + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) # <<<<<<<<<<<<<< + * return precision + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L1_error) + (void)(__pyx_v_self->hh.getPrecision(__pyx_t_1, __pyx_v_precision)); + + /* "PyCafe.pyx":1646 + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + * return precision # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getPrecision", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1650 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181hasAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181hasAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("hasAlarmStatusSeverity (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_180hasAlarmStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_180hasAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("hasAlarmStatusSeverity", 0); + + /* "PyCafe.pyx":1651 + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): + * return self.hh.hasAlarmStatusSeverity(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->hh.hasAlarmStatusSeverity(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1650 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.hasAlarmStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getAlarmStatusSeverity (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_182getAlarmStatusSeverity(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_182getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + short __pyx_v_aStatSev[2]; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getAlarmStatusSeverity", 0); + + /* "PyCafe.pyx":1657 + * def getAlarmStatusSeverity(self, handlePV): + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) # <<<<<<<<<<<<<< + * return aStatSev[0], aStatSev[1] + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1657, __pyx_L1_error) + (void)(__pyx_v_self->hh.getAlarmStatusSeverity(__pyx_t_1, __pyx_v_aStatSev)); + + /* "PyCafe.pyx":1658 + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + * return aStatSev[0], aStatSev[1] # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getAlarmStatusSeverity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1662 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185getTimeStamp(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185getTimeStamp(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeStamp (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_184getTimeStamp(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_184getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ll = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("getTimeStamp", 0); + + /* "PyCafe.pyx":1665 + * + * cdef HandleHelper hh + * hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV) # <<<<<<<<<<<<<< + * + * cdef ll = [] + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_v_hh._etsNorm = __pyx_v_self->hh.getEpicsTimeStampAsUInt32(__pyx_t_1); + + /* "PyCafe.pyx":1667 + * hh._etsNorm = self.hh.getEpicsTimeStampAsUInt32(handlePV) + * + * cdef ll = [] # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_ll = __pyx_t_2; + __pyx_t_2 = 0; + + /* "PyCafe.pyx":1668 + * + * cdef ll = [] + * ll.append(hh._etsNorm.secPastEpoch) # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.nsec) + * + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1669 + * cdef ll = [] + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) # <<<<<<<<<<<<<< + * + * return ll + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.nsec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1669, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1671 + * ll.append(hh._etsNorm.nsec) + * + * return ll # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":1662 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1675 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187getTimeStampAsDate(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187getTimeStampAsDate(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getTimeStampAsDate (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_186getTimeStampAsDate(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_186getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ld = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("getTimeStampAsDate", 0); + + /* "PyCafe.pyx":1678 + * + * cdef HandleHelper hh + * cdef ld = [] # <<<<<<<<<<<<<< + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ld = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1680 + * cdef ld = [] + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) + */ + __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_v_hh._etsDate = __pyx_v_self->hh.getEpicsTimeStampAsDate(__pyx_t_2); + + /* "PyCafe.pyx":1681 + * + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + * ld.append(hh._etsDate.year) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1681, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1682 + * hh._etsDate = self.hh.getEpicsTimeStampAsDate(handlePV) + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.mon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1682, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1683 + * ld.append(hh._etsDate.year) + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1684 + * ld.append(hh._etsDate.mon) + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1685 + * ld.append(hh._etsDate.day) + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.sec) + * ld.append(hh._etsDate.nsec) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1686 + * ld.append(hh._etsDate.hour) + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.nsec) + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1686, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1687 + * ld.append(hh._etsDate.min) + * ld.append(hh._etsDate.sec) + * ld.append(hh._etsDate.nsec) # <<<<<<<<<<<<<< + * + * return ld + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_hh._etsDate.nsec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1689 + * ld.append(hh._etsDate.nsec) + * + * return ld # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ld); + __pyx_r = __pyx_v_ld; + goto __pyx_L0; + + /* "PyCafe.pyx":1675 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getTimeStampAsDate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1693 + * ############################################################################ + * ### Allow user to choose whether or not to open ##### + * def checkForHandle(self, str pv, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForHandle (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForHandle") < 0)) __PYX_ERR(0, 1693, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1693, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForHandle", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1693, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyUnicode_Type), 1, "pv", 1))) __PYX_ERR(0, 1693, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_188checkForHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_188checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_v_force) { + unsigned int __pyx_v__handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("checkForHandle", 0); + + /* "PyCafe.pyx":1694 + * ### Allow user to choose whether or not to open ##### + * def checkForHandle(self, str pv, bint force=True): + * cdef unsigned int _handle = 0 # <<<<<<<<<<<<<< + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + */ + __pyx_v__handle = 0; + + /* "PyCafe.pyx":1695 + * def checkForHandle(self, str pv, bint force=True): + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) # <<<<<<<<<<<<<< + * if _handle == 0: + * if (force): + */ + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_pv); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L1_error) + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_1); + + /* "PyCafe.pyx":1696 + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.open(pv) + */ + __pyx_t_2 = ((__pyx_v__handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1697 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.open(pv) + * else: + */ + __pyx_t_2 = (__pyx_v_force != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1698 + * if _handle == 0: + * if (force): + * return self.open(pv) # <<<<<<<<<<<<<< + * else: + * return 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_pv) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_pv); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1697 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.open(pv) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1700 + * return self.open(pv) + * else: + * return 0 # <<<<<<<<<<<<<< + * else: + * return _handle + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + } + __pyx_L4:; + + /* "PyCafe.pyx":1696 + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.open(pv) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1702 + * return 0 + * else: + * return _handle # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1693 + * ############################################################################ + * ### Allow user to choose whether or not to open ##### + * def checkForHandle(self, str pv, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * _handle = self.hh.getHandleFromPV(pv) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1706 + * + * ############################################################################ + * def checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pvList = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForHandleList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pvList,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForHandleList") < 0)) __PYX_ERR(0, 1706, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pvList = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1706, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForHandleList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1706, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandleList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvList), (&PyList_Type), 1, "pvList", 1))) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_190checkForHandleList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pvList, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_190checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_v_force) { + unsigned int __pyx_v_nToOpen; + PyObject *__pyx_v_handleList = NULL; + unsigned int __pyx_v__handle; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + char const *__pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("checkForHandleList", 0); + + /* "PyCafe.pyx":1708 + * def checkForHandleList(self, list pvList, bint force=True): + * + * cdef unsigned int nToOpen = 0 # <<<<<<<<<<<<<< + * handleList = [] + * cdef unsigned int _handle = 0 + */ + __pyx_v_nToOpen = 0; + + /* "PyCafe.pyx":1709 + * + * cdef unsigned int nToOpen = 0 + * handleList = [] # <<<<<<<<<<<<<< + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handleList = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":1710 + * cdef unsigned int nToOpen = 0 + * handleList = [] + * cdef unsigned int _handle = 0 # <<<<<<<<<<<<<< + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + */ + __pyx_v__handle = 0; + + /* "PyCafe.pyx":1711 + * handleList = [] + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): # <<<<<<<<<<<<<< + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + */ + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 1711, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_pvList); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":1712 + * cdef unsigned int _handle = 0 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) # <<<<<<<<<<<<<< + * if _handle == 0: + * if (force): + */ + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1712, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pvList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1712, __pyx_L1_error) + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1713 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * nToOpen = nToOpen+1 + */ + __pyx_t_6 = ((__pyx_v__handle == 0) != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":1714 + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen = nToOpen+1 + * self.openNoWait() + */ + __pyx_t_6 = (__pyx_v_force != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":1715 + * if _handle == 0: + * if (force): + * nToOpen = nToOpen+1 # <<<<<<<<<<<<<< + * self.openNoWait() + * _handle = self.open(pvList[i]) + */ + __pyx_v_nToOpen = (__pyx_v_nToOpen + 1); + + /* "PyCafe.pyx":1716 + * if (force): + * nToOpen = nToOpen+1 + * self.openNoWait() # <<<<<<<<<<<<<< + * _handle = self.open(pvList[i]) + * handleList.append(_handle) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNoWait); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1717 + * nToOpen = nToOpen+1 + * self.openNoWait() + * _handle = self.open(pvList[i]) # <<<<<<<<<<<<<< + * handleList.append(_handle) + * else: + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_pvList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 1717, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_pvList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__handle = __pyx_t_10; + + /* "PyCafe.pyx":1714 + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen = nToOpen+1 + * self.openNoWait() + */ + } + + /* "PyCafe.pyx":1718 + * self.openNoWait() + * _handle = self.open(pvList[i]) + * handleList.append(_handle) # <<<<<<<<<<<<<< + * else: + * handleList.append(_handle) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1718, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1713 + * for i in range(0, len(pvList)): + * _handle = self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * nToOpen = nToOpen+1 + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":1720 + * handleList.append(_handle) + * else: + * handleList.append(_handle) # <<<<<<<<<<<<<< + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1720, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + } + + /* "PyCafe.pyx":1721 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList + */ + __pyx_t_6 = ((__pyx_v_nToOpen > 0) != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":1722 + * handleList.append(_handle) + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) # <<<<<<<<<<<<<< + * return handleList + * ############################################################################ + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNowAndWait); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyFloat_FromDouble((2.0 + (__pyx_v_nToOpen * 0.01))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1721 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList + */ + } + + /* "PyCafe.pyx":1723 + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.01) + * return handleList # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_handleList); + __pyx_r = __pyx_v_handleList; + goto __pyx_L0; + + /* "PyCafe.pyx":1706 + * + * ############################################################################ + * def checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForHandleList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1727 + * + * ############################################################################ + * def checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_gName = 0; + int __pyx_v_force; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("checkForGroupHandle (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gName,&__pyx_n_s_force,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_force); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "checkForGroupHandle") < 0)) __PYX_ERR(0, 1727, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_gName = ((PyObject*)values[0]); + if (values[1]) { + __pyx_v_force = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_force == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + } else { + __pyx_v_force = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("checkForGroupHandle", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1727, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.checkForGroupHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gName), (&PyUnicode_Type), 1, "gName", 1))) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_192checkForGroupHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gName, __pyx_v_force); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_192checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_v_force) { + unsigned int __pyx_v__ghandle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("checkForGroupHandle", 0); + + /* "PyCafe.pyx":1728 + * ############################################################################ + * def checkForGroupHandle(self, str gName, bint force=True): + * cdef unsigned int _ghandle = 0 # <<<<<<<<<<<<<< + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + */ + __pyx_v__ghandle = 0; + + /* "PyCafe.pyx":1729 + * def checkForGroupHandle(self, str gName, bint force=True): + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) # <<<<<<<<<<<<<< + * if _ghandle == 0: + * if (force): + */ + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_gName); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_v__ghandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_1); + + /* "PyCafe.pyx":1730 + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.groupOpen(gName) + */ + __pyx_t_2 = ((__pyx_v__ghandle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1731 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.groupOpen(gName) + * else: + */ + __pyx_t_2 = (__pyx_v_force != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1732 + * if _ghandle == 0: + * if (force): + * return self.groupOpen(gName) # <<<<<<<<<<<<<< + * else: + * return 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_groupOpen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_gName) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_gName); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1731 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.groupOpen(gName) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":1734 + * return self.groupOpen(gName) + * else: + * return 0 # <<<<<<<<<<<<<< + * else: + * return _ghandle + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + } + __pyx_L4:; + + /* "PyCafe.pyx":1730 + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.groupOpen(gName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1736 + * return 0 + * else: + * return _ghandle # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v__ghandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":1727 + * + * ############################################################################ + * def checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle = 0 + * _ghandle = self.hh.getGroupHandleFromGroupName(gName) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.checkForGroupHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1741 + * ############################################################################ + * + * def getPVNameFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h) { + int __pyx_v_h; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVNameFromHandle (wrapper)", 0); + assert(__pyx_arg_h); { + __pyx_v_h = __Pyx_PyInt_As_int(__pyx_arg_h); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1741, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVNameFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_194getPVNameFromHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_h)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_194getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getPVNameFromHandle", 0); + + /* "PyCafe.pyx":1742 + * + * def getPVNameFromHandle(self, int h): + * return self._c_cafe.getPVFromHandle(h) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_h)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1741 + * ############################################################################ + * + * def getPVNameFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVNameFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1746 + * + * ############################################################################ + * def getHandleFromPVName(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPVName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 1746, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_196getHandleFromPVName(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_name)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_196getHandleFromPVName(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getHandleFromPVName", 0); + + /* "PyCafe.pyx":1750 + * # py_string = (name).encode('UTF-8') + * # return self._c_cafe.getHandleFromPV(py_string) + * return self._c_cafe.getHandleFromPV(name) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1750, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_c_cafe->getHandleFromPV(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1746 + * + * ############################################################################ + * def getHandleFromPVName(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1755 + * ############################################################################ + * + * def getPVFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199getPVFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199getPVFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h) { + int __pyx_v_h; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFromHandle (wrapper)", 0); + assert(__pyx_arg_h); { + __pyx_v_h = __Pyx_PyInt_As_int(__pyx_arg_h); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1755, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_198getPVFromHandle(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((int)__pyx_v_h)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_198getPVFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("getPVFromHandle", 0); + + /* "PyCafe.pyx":1756 + * + * def getPVFromHandle(self, int h): + * return self._c_cafe.getPVFromHandle(h) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_h)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1755 + * ############################################################################ + * + * def getPVFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1760 + * + * ############################################################################ + * def getHandleFromPV(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getHandleFromPV(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getHandleFromPV(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPV (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 1760, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_200getHandleFromPV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_name)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_200getHandleFromPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getHandleFromPV", 0); + + /* "PyCafe.pyx":1764 + * # py_string = (name).encode('UTF-8') + * # return self._c_cafe.getHandleFromPV(py_string) + * return self._c_cafe.getHandleFromPV(name) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_c_cafe->getHandleFromPV(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1760 + * + * ############################################################################ + * def getHandleFromPV(self, str name): # <<<<<<<<<<<<<< + * # if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1767 + * ############################################################################ + * + * def getChannelDataStore(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getChannelDataStore(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getChannelDataStore(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelDataStore (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_202getChannelDataStore(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_202getChannelDataStore(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + CYTHON_UNUSED PyObject *__pyx_v_pv = 0; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_pvds = NULL; + PyObject *__pyx_v_pvcs = NULL; + PyObject *__pyx_v_infos = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + __Pyx_RefNannySetupContext("getChannelDataStore", 0); + + /* "PyCafe.pyx":1768 + * + * def getChannelDataStore(self, handlePV): + * cdef str _METHOD = "getChannelDataStore" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * cdef str pv = "" + */ + __Pyx_INCREF(__pyx_n_u_getChannelDataStore); + __pyx_v__METHOD = __pyx_n_u_getChannelDataStore; + + /* "PyCafe.pyx":1769 + * def getChannelDataStore(self, handlePV): + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1770 + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + * cdef str pv = "" # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __Pyx_INCREF(__pyx_kp_u__5); + __pyx_v_pv = __pyx_kp_u__5; + + /* "PyCafe.pyx":1771 + * cdef unsigned int handle = 0 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1772 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1773 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + */ + __pyx_t_5 = __Pyx_PyUnicode_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_pv, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1771 + * cdef unsigned int handle = 0 + * cdef str pv = "" + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1774 + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1775 + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) # <<<<<<<<<<<<<< + * pv = handlePV + * else: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_handlePV); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, Py_True) < 0) __PYX_ERR(0, 1775, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1775, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1776 + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format( + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_handlePV))||((__pyx_v_handlePV) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_handlePV)->tp_name), 0))) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_8 = __pyx_v_handlePV; + __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_pv, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":1774 + * handle = handlePV + * pv = self._c_cafe.getPVFromHandle(handle) + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * pv = handlePV + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1778 + * pv = handlePV + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":1779 + * else: + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, \ + * else if PV")) + */ + __pyx_t_6 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_2}; + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + } else + #endif + { + __pyx_t_5 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_2); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_o_2); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1778 + * pv = handlePV + * else: + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be of type if handle, \ + */ + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1778, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":1783 + * else if PV")) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1784 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1785 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":1784 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":1786 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + * + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1786, __pyx_L1_error) + + /* "PyCafe.pyx":1783 + * else if PV")) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":1790 + * + * cdef ChannelDataStore cds + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * # with nogil: + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":1802 + * #status=self._c_cafe.getCtrlCache(handle, pvc) + * + * pvds = self.getPVCache(handle) # <<<<<<<<<<<<<< + * pvcs = self.getCtrlCache(handle) + * infos = self.getChannelInfo(handle) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_pvds = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1803 + * + * pvds = self.getPVCache(handle) + * pvcs = self.getCtrlCache(handle) # <<<<<<<<<<<<<< + * infos = self.getChannelInfo(handle) + * + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCtrlCache); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_pvcs = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1804 + * pvds = self.getPVCache(handle) + * pvcs = self.getCtrlCache(handle) + * infos = self.getChannelInfo(handle) # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getChannelInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_infos = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1832 + * + * # return cds.description, channelRegaliaToStruct(cds.info), PVDataHolderToStruct(cds.pvd), PVCtrlHolderToStruct(cds.pvc) + * return infos, pvds, pvcs # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_infos); + __Pyx_GIVEREF(__pyx_v_infos); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_infos); + __Pyx_INCREF(__pyx_v_pvds); + __Pyx_GIVEREF(__pyx_v_pvds); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_pvds); + __Pyx_INCREF(__pyx_v_pvcs); + __Pyx_GIVEREF(__pyx_v_pvcs); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_pvcs); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1767 + * ############################################################################ + * + * def getChannelDataStore(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelDataStore" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelDataStore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pv); + __Pyx_XDECREF(__pyx_v_pvds); + __Pyx_XDECREF(__pyx_v_pvcs); + __Pyx_XDECREF(__pyx_v_infos); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1836 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getChannelInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getChannelInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelInfo (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_204getChannelInfo(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_204getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + PyObject *__pyx_v_PyCafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException __pyx_t_5; + __Pyx_RefNannySetupContext("getChannelInfo", 0); + + /* "PyCafe.pyx":1837 + * @verify_handlepv + * def getChannelInfo(self, handlePV): + * cdef str _METHOD = "getChannelInfo(handlePV)" # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + */ + __Pyx_INCREF(__pyx_kp_u_getChannelInfo_handlePV); + __pyx_v__METHOD = __pyx_kp_u_getChannelInfo_handlePV; + + /* "PyCafe.pyx":1839 + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) # <<<<<<<<<<<<<< + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->getChannelInfo(__pyx_t_1, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":1841 + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + */ + __pyx_t_3 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "PyCafe.pyx":1843 + * if self._enable_exceptions and status != ICAFE_NORMAL: + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) # <<<<<<<<<<<<<< + * raise PyCafeException + * # cdef channelInfo ci=channelRegaliaToStruct(cr) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L1_error) + + /* "PyCafe.pyx":1842 + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: + * PyCafeException = self.prepareCafeException( # <<<<<<<<<<<<<< + * status, _METHOD, handle=handlePV) + * raise PyCafeException + */ + __pyx_t_5.__pyx_n = 1; + __pyx_t_5.handle = __pyx_t_1; + __pyx_t_4 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->prepareCafeException(__pyx_v_self, __pyx_v_status, __pyx_v__METHOD, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_PyCafeException = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1844 + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + * raise PyCafeException # <<<<<<<<<<<<<< + * # cdef channelInfo ci=channelRegaliaToStruct(cr) + * # ci.channelID=self._c_cafe.getChannelIDAsString(cr.getChannelID()) + */ + __Pyx_Raise(__pyx_v_PyCafeException, 0, 0, 0); + __PYX_ERR(0, 1844, __pyx_L1_error) + + /* "PyCafe.pyx":1841 + * status = self._c_cafe.getChannelInfo(handlePV, self.channelInfo) + * #print("ln", __FILE__, __LINE__,inspect.currentframe().f_lineno ) + * if self._enable_exceptions and status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handlePV) + */ + } + + /* "PyCafe.pyx":1849 + * # do hex(cr.getChannelID()) to get channelId in hex form + * + * return channelRegaliaToStruct(self.channelInfo) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = ((PyObject *)__pyx_f_6PyCafe_channelRegaliaToStruct(__pyx_v_self->channelInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1836 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_PyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1853 + * + * + * def getChannelList(self, list listStrings): # <<<<<<<<<<<<<< + * return self._c_cafe.getFromGlobalChannelList(listStrings) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getChannelList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_listStrings), (&PyList_Type), 1, "listStrings", 1))) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_206getChannelList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_listStrings)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_206getChannelList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_listStrings) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getChannelList", 0); + + /* "PyCafe.pyx":1854 + * + * def getChannelList(self, list listStrings): + * return self._c_cafe.getFromGlobalChannelList(listStrings) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_listStrings); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->_c_cafe->getFromGlobalChannelList(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1853 + * + * + * def getChannelList(self, list listStrings): # <<<<<<<<<<<<<< + * return self._c_cafe.getFromGlobalChannelList(listStrings) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getChannelList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1860 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209getWFAsString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209getWFAsString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cache = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWFAsString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cache,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cache); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getWFAsString") < 0)) __PYX_ERR(0, 1860, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cache = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getWFAsString", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1860, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_208getWFAsString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cache); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_208getWFAsString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cache) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_strWF; + PyObject *__pyx_v_bWF = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_v_PyCafeException = NULL; + PyObject *__pyx_v_a = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getWFAsString", 0); + + /* "PyCafe.pyx":1861 + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): + * cdef str _METHOD = "getWFAsString" # <<<<<<<<<<<<<< + * cdef string strWF + * + */ + __Pyx_INCREF(__pyx_n_u_getWFAsString); + __pyx_v__METHOD = __pyx_n_u_getWFAsString; + + /* "PyCafe.pyx":1865 + * + * cdef bytes bWF + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * if cache: + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":1866 + * cdef bytes bWF + * cdef unsigned int handle = handlePV + * if cache: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cache); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1866, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":1867 + * cdef unsigned int handle = handlePV + * if cache: + * status = self._c_cafe.getWFAsStringCache(handle, strWF) # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getWFAsStringCache(__pyx_v_handle, __pyx_v_strWF); + + /* "PyCafe.pyx":1866 + * cdef bytes bWF + * cdef unsigned int handle = handlePV + * if cache: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1869 + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsString(handle, strWF) + * + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":1870 + * else: + * with nogil: + * status = self._c_cafe.getWFAsString(handle, strWF) # <<<<<<<<<<<<<< + * + * #mport codecs + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getWFAsString(__pyx_v_handle, __pyx_v_strWF); + } + + /* "PyCafe.pyx":1869 + * status = self._c_cafe.getWFAsStringCache(handle, strWF) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getWFAsString(handle, strWF) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L6:; + } + } + } + __pyx_L3:; + + /* "PyCafe.pyx":1886 + * ##FOR TESTINg raise PyCafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1888 + * if status != ICAFE_NORMAL: + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1889 + * + * if self._enable_exceptions: + * PyCafeException = self.prepareCafeException( # <<<<<<<<<<<<<< + * status, _METHOD, handle=handle) + * raise PyCafeException + */ + __pyx_t_4.__pyx_n = 1; + __pyx_t_4.handle = __pyx_v_handle; + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->prepareCafeException(__pyx_v_self, __pyx_v_status, __pyx_v__METHOD, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_PyCafeException = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":1891 + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + * raise PyCafeException # <<<<<<<<<<<<<< + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __Pyx_Raise(__pyx_v_PyCafeException, 0, 0, 0); + __PYX_ERR(0, 1891, __pyx_L1_error) + + /* "PyCafe.pyx":1888 + * if status != ICAFE_NORMAL: + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * PyCafeException = self.prepareCafeException( + * status, _METHOD, handle=handle) + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":1893 + * raise PyCafeException + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1894 + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":1893 + * raise PyCafeException + * + * elif PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + __pyx_L8:; + + /* "PyCafe.pyx":1886 + * ##FOR TESTINg raise PyCafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":1897 + * + * + * bWF = strWF # <<<<<<<<<<<<<< + * a = (bWF).decode('latin-1') + * return a + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_strWF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_bWF = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1898 + * + * bWF = strWF + * a = (bWF).decode('latin-1') # <<<<<<<<<<<<<< + * return a + * ''' + */ + if (unlikely(__pyx_v_bWF == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 1898, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bWF, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_a = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1899 + * bWF = strWF + * a = (bWF).decode('latin-1') + * return a # <<<<<<<<<<<<<< + * ''' + * b = a.encode('latin-1') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_a); + __pyx_r = __pyx_v_a; + goto __pyx_L0; + + /* "PyCafe.pyx":1860 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_bWF); + __Pyx_XDECREF(__pyx_v_PyCafeException); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1914 + * ############################################################################ + * + * def getWFAsStringCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getWFAsString(handlePV, cache=True) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getWFAsStringCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getWFAsStringCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getWFAsStringCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_210getWFAsStringCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_210getWFAsStringCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getWFAsStringCache", 0); + + /* "PyCafe.pyx":1915 + * + * def getWFAsStringCache(self, handlePV): + * return self.getWFAsString(handlePV, cache=True) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cache, Py_True) < 0) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1914 + * ############################################################################ + * + * def getWFAsStringCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getWFAsString(handlePV, cache=True) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getWFAsStringCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1921 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213isEnum(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213isEnum(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isEnum (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_212isEnum(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_212isEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("isEnum", 0); + + /* "PyCafe.pyx":1922 + * @verify_handlepv + * def isEnum(self, handlePV): + * return self._c_cafe.isEnum(handlePV) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1922, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isEnum(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1921 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.isEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1927 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getEnumStrings(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getEnumStrings(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getEnumStrings (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_214getEnumStrings(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_214getEnumStrings(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getEnumStrings", 0); + + /* "PyCafe.pyx":1928 + * @verify_handlepv + * def getEnumStrings(self, handlePV): + * return self.hh.getEnumStrings(handlePV) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1928, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->hh.getEnumStrings(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1927 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumStrings", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1932 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_enumString = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getEnumFromString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_enumString,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enumString)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getEnumFromString", 1, 2, 2, 1); __PYX_ERR(0, 1932, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEnumFromString") < 0)) __PYX_ERR(0, 1932, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_enumString = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getEnumFromString", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1932, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_enumString), (&PyUnicode_Type), 1, "enumString", 1))) __PYX_ERR(0, 1932, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_216getEnumFromString(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_enumString); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_216getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString) { + PyObject *__pyx_v__METHOD = 0; + short __pyx_v_enumValue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + std::string __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("getEnumFromString", 0); + + /* "PyCafe.pyx":1933 + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD = "getEnumFromString" # <<<<<<<<<<<<<< + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + */ + __Pyx_INCREF(__pyx_n_u_getEnumFromString); + __pyx_v__METHOD = __pyx_n_u_getEnumFromString; + + /* "PyCafe.pyx":1935 + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) # <<<<<<<<<<<<<< + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1935, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_enumString); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1935, __pyx_L1_error) + __pyx_v_enumValue = __pyx_v_self->hh.getEnumFromString(__pyx_t_1, ((std::string)__pyx_t_2)); + + /* "PyCafe.pyx":1936 + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: # <<<<<<<<<<<<<< + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( + */ + __pyx_t_3 = ((__pyx_v_enumValue == INVALID_ENUM_RETURN_VALUE) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1938 + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "ENUM string value:", enumString, "not recognized! ", + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2_3_4_5, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":1940 + * "{0} {1} \n{2} {3} {4} \n{5}".format( + * self._exception_text, _METHOD, + * "ENUM string value:", enumString, "not recognized! ", # <<<<<<<<<<<<<< + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumValue + */ + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_string_value, __pyx_v_enumString, __pyx_kp_u_not_recognized, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_string_value, __pyx_v_enumString, __pyx_kp_u_not_recognized, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_ENUM_string_value); + __Pyx_GIVEREF(__pyx_kp_u_ENUM_string_value); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_ENUM_string_value); + __Pyx_INCREF(__pyx_v_enumString); + __Pyx_GIVEREF(__pyx_v_enumString); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_enumString); + __Pyx_INCREF(__pyx_kp_u_not_recognized); + __Pyx_GIVEREF(__pyx_kp_u_not_recognized); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_kp_u_not_recognized); + __Pyx_INCREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + __Pyx_GIVEREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_kp_u_Execute_getEnumStrings_handlePV); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1937 + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: + * raise ValueError( # <<<<<<<<<<<<<< + * "{0} {1} \n{2} {3} {4} \n{5}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1937, __pyx_L1_error) + + /* "PyCafe.pyx":1936 + * cdef short enumValue + * enumValue = self.hh.getEnumFromString(handlePV, enumString) + * if enumValue == INVALID_ENUM_RETURN_VALUE: # <<<<<<<<<<<<<< + * raise ValueError( + * "{0} {1} \n{2} {3} {4} \n{5}".format( + */ + } + + /* "PyCafe.pyx":1942 + * "ENUM string value:", enumString, "not recognized! ", + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumValue # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_short(__pyx_v_enumValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1932 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getEnumFromString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1946 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned short __pyx_v_enumValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStringFromEnum (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_enumValue,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enumValue); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStringFromEnum") < 0)) __PYX_ERR(0, 1946, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + if (values[1]) { + __pyx_v_enumValue = __Pyx_PyInt_As_unsigned_short(values[1]); if (unlikely((__pyx_v_enumValue == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 1946, __pyx_L3_error) + } else { + __pyx_v_enumValue = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStringFromEnum", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1946, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStringFromEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_218getStringFromEnum(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_enumValue); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_218getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned short __pyx_v_enumValue) { + PyObject *__pyx_v__METHOD = 0; + std::string __pyx_v_enumString; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("getStringFromEnum", 0); + + /* "PyCafe.pyx":1947 + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" # <<<<<<<<<<<<<< + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: + */ + __Pyx_INCREF(__pyx_n_u_getStringFromEnum); + __pyx_v__METHOD = __pyx_n_u_getStringFromEnum; + + /* "PyCafe.pyx":1948 + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) # <<<<<<<<<<<<<< + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1948, __pyx_L1_error) + __pyx_v_enumString = __pyx_v_self->hh.getStringFromEnum(__pyx_t_1, __pyx_v_enumValue); + + /* "PyCafe.pyx":1949 + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( + */ + __pyx_t_2 = ((__pyx_v_enumString == INVALID_ENUM_RETURN_STRING) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1951 + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "ENUM value:", enumValue, "is not a valid option. ", + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__47, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":1953 + * "{} {} \n{} {} {} \n{}".format( + * self._exception_text, _METHOD, + * "ENUM value:", enumValue, "is not a valid option. ", # <<<<<<<<<<<<<< + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumString + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_enumValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_value, __pyx_t_5, __pyx_kp_u_is_not_a_valid_option, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_ENUM_value, __pyx_t_5, __pyx_kp_u_is_not_a_valid_option, __pyx_kp_u_Execute_getEnumStrings_handlePV}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_ENUM_value); + __Pyx_GIVEREF(__pyx_kp_u_ENUM_value); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_ENUM_value); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_is_not_a_valid_option); + __Pyx_GIVEREF(__pyx_kp_u_is_not_a_valid_option); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_kp_u_is_not_a_valid_option); + __Pyx_INCREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + __Pyx_GIVEREF(__pyx_kp_u_Execute_getEnumStrings_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_kp_u_Execute_getEnumStrings_handlePV); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":1950 + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: + * raise ValueError( # <<<<<<<<<<<<<< + * "{} {} \n{} {} {} \n{}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1950, __pyx_L1_error) + + /* "PyCafe.pyx":1949 + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + * if enumString == INVALID_ENUM_RETURN_STRING: # <<<<<<<<<<<<<< + * raise ValueError( + * "{} {} \n{} {} {} \n{}".format( + */ + } + + /* "PyCafe.pyx":1955 + * "ENUM value:", enumValue, "is not a valid option. ", + * "Execute getEnumStrings(handlePV) to view enumerated values")) + * return enumString # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_enumString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1946 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getStringFromEnum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1969 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + DBR_TYPE __pyx_v_dbrBase; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setDbrBase (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dbrBase,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbrBase)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setDbrBase", 1, 2, 2, 1); __PYX_ERR(0, 1969, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDbrBase") < 0)) __PYX_ERR(0, 1969, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_dbrBase = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1969, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setDbrBase", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1969, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_220setDbrBase(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dbrBase); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_220setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setDbrBase", 0); + + /* "PyCafe.pyx":1972 + * + * # Print Warning Message + * if dbrBase > DBR_TIME: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + */ + __pyx_t_1 = ((__pyx_v_dbrBase > DBR_TIME) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1973 + * # Print Warning Message + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") # <<<<<<<<<<<<<< + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1974 + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") # <<<<<<<<<<<<<< + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1975 + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") # <<<<<<<<<<<<<< + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1976 + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbrBase = DBR_TIME + * + */ + __pyx_t_2 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbrBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_DBR_TIME); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_DBR_TIME); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_DBR_TIME); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":1977 + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME # <<<<<<<<<<<<<< + * + * return self.hh.setCafeDbrType(handlePV, dbrBase) + */ + __pyx_v_dbrBase = DBR_TIME; + + /* "PyCafe.pyx":1972 + * + * # Print Warning Message + * if dbrBase > DBR_TIME: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + */ + } + + /* "PyCafe.pyx":1979 + * dbrBase = DBR_TIME + * + * return self.hh.setCafeDbrType(handlePV, dbrBase) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1979, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setCafeDbrType(__pyx_t_4, __pyx_v_dbrBase)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1969 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1984 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrBase (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_222getDbrBase(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_222getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + DBR_TYPE __pyx_v__cafeDbrType; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getDbrBase", 0); + + /* "PyCafe.pyx":1986 + * def getDbrBase(self, handlePV): + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN # <<<<<<<<<<<<<< + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) + * + */ + __pyx_v__cafeDbrType = DBR_PLAIN; + + /* "PyCafe.pyx":1987 + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) # <<<<<<<<<<<<<< + * + * return _cafeDbrType + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1987, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->hh.getCafeDbrType(__pyx_t_1, __pyx_v__cafeDbrType); + + /* "PyCafe.pyx":1989 + * cdef int status = self.hh.getCafeDbrType(handlePV, _cafeDbrType) + * + * return _cafeDbrType # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v__cafeDbrType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1984 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getDbrBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1995 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetCacheWaitPolicy (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_wpk,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetCacheWaitPolicy", 1, 2, 2, 1); __PYX_ERR(0, 1995, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetCacheWaitPolicy") < 0)) __PYX_ERR(0, 1995, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_wpk = ((ChannelGetCacheWaitPolicyKind)__Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1996, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGetCacheWaitPolicy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1995, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_wpk); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_224setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk) { + ChannelGetCacheWaitPolicy __pyx_v_channelGetCacheWaitPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicy", 0); + + /* "PyCafe.pyx":1999 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2000 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2003 + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2004 + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2008 + * "GET_CACHE_WAIT (2)")) + * print( + * "The value entered was", wpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2007 + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + * print( # <<<<<<<<<<<<<< + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2010 + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":1999 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + */ + } + + /* "PyCafe.pyx":2013 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicy( + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":2015 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetCacheWaitPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2016 + * + * return self.ph.setChannelGetCacheWaitPolicy( + * handlePV, channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L1_error) + + /* "PyCafe.pyx":2015 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetCacheWaitPolicy) + * ############################################################################ + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicy(__pyx_t_4, __pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1995 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2020 + * + * ############################################################################ + * def setGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetCacheWaitPolicyKind wpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk) { + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetCacheWaitPolicyAllHandles (wrapper)", 0); + assert(__pyx_arg_wpk); { + __pyx_v_wpk = ((ChannelGetCacheWaitPolicyKind)__Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(__pyx_arg_wpk)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2021, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((ChannelGetCacheWaitPolicyKind)__pyx_v_wpk)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_226setGetCacheWaitPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetCacheWaitPolicyKind __pyx_v_wpk) { + ChannelGetCacheWaitPolicy __pyx_v_channelGetCacheWaitPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicyAllHandles", 0); + + /* "PyCafe.pyx":2024 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2025 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2028 + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2029 + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2033 + * GET_CACHE_WAIT (2)") + * print( + * "The value entered was", wpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2032 + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + * print( # <<<<<<<<<<<<<< + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2035 + * "The value entered was", wpk, + * "hence assuming default value GET_CACHE_WAIT") + * wpk = GET_CACHE_WAIT # <<<<<<<<<<<<<< + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":2024 + * + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: # <<<<<<<<<<<<<< + * print( + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + */ + } + + /* "PyCafe.pyx":2038 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":2040 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * channelGetCacheWaitPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2041 + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles( + * channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicyAllHandles(__pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2020 + * + * ############################################################################ + * def setGetCacheWaitPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetCacheWaitPolicyKind wpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetCacheWaitPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2046 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicy (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_wmpk,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wmpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetActionWhenMonitorPolicy", 1, 2, 2, 1); __PYX_ERR(0, 2046, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetActionWhenMonitorPolicy") < 0)) __PYX_ERR(0, 2046, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_wmpk = ((ChannelGetActionWhenMonitorPolicyKind)__Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(values[1])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2047, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGetActionWhenMonitorPolicy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2046, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_wmpk); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_228setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk) { + ChannelGetActionWhenMonitorPolicy __pyx_v_channelGetActionWhenMonitorPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + unsigned int __pyx_t_4; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicy", 0); + + /* "PyCafe.pyx":2050 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2051 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2052 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2053 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2054 + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2056 + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":2050 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + } + + /* "PyCafe.pyx":2059 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":2061 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2062 + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( + * handlePV, channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2062, __pyx_L1_error) + + /* "PyCafe.pyx":2061 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * handlePV, channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicy(__pyx_t_4, __pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2046 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2066 + * + * ############################################################################ + * def setGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk) { + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicyAllHandles (wrapper)", 0); + assert(__pyx_arg_wmpk); { + __pyx_v_wmpk = ((ChannelGetActionWhenMonitorPolicyKind)__Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(__pyx_arg_wmpk)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2067, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((ChannelGetActionWhenMonitorPolicyKind)__pyx_v_wmpk)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_230setGetActionWhenMonitorPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk) { + ChannelGetActionWhenMonitorPolicy __pyx_v_channelGetActionWhenMonitorPolicy; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicyAllHandles", 0); + + /* "PyCafe.pyx":2070 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2071 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2072 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2073 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print( + * "The value entered was", wmpk, + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2075 + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( + * "The value entered was", wmpk, # <<<<<<<<<<<<<< + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2074 + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print( # <<<<<<<<<<<<<< + * "The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_default_value_GET_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_hence_assuming_default_value_GET_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":2077 + * "The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + * wmpk = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":2070 + * + * # Print Warning Message + * if wmpk > GET_FROM_IOC: # <<<<<<<<<<<<<< + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + */ + } + + /* "PyCafe.pyx":2080 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":2082 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * channelGetActionWhenMonitorPolicy) + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + + /* "PyCafe.pyx":2083 + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles( + * channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicyAllHandles(__pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2066 + * + * ############################################################################ + * def setGetActionWhenMonitorPolicyAllHandles( # <<<<<<<<<<<<<< + * self, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.setGetActionWhenMonitorPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2088 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static char __pyx_doc_6PyCafe_6CyCafe_232getNonBlocking[] = "Requires cafe.ca_flush_io by user.\n In this resepct, it differs from cafe.getAsync\n which will accepts a list, and execute a flush\n at the end.\n "; +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getNonBlocking (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_232getNonBlocking(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("getNonBlocking", 0); + + /* "PyCafe.pyx":2094 + * at the end. + * ''' + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * cdef int status + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2094, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2097 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getNonBlocking(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2098 + * + * with nogil: + * status = self._c_cafe.getNonBlocking(handle) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getNonBlocking(__pyx_v_handle); + } + + /* "PyCafe.pyx":2097 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getNonBlocking(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":2100 + * status = self._c_cafe.getNonBlocking(handle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2101 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2102 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2103 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2102 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":2105 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * raise Exception( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":2101 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2106 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2109 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + * Status = {0}".format(status)) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2107 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + * Status = {0}".format(status)) + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 2107, __pyx_L1_error) + + /* "PyCafe.pyx":2106 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getNonBlocking. \ + */ + } + + /* "PyCafe.pyx":2100 + * status = self._c_cafe.getNonBlocking(handle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2111 + * Status = {0}".format(status)) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2088 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getNonBlocking", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2115 + * + * ############################################################################ + * def getStr(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='str') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStr (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStr") < 0)) __PYX_ERR(0, 2115, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStr", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2115, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_234getStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_234getStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStr", 0); + + /* "PyCafe.pyx":2116 + * ############################################################################ + * def getStr(self, handlePV, object cb=None): + * return self.get(handlePV, dt='str') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 2116, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2115 + * + * ############################################################################ + * def getStr(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='str') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2120 + * + * ############################################################################ + * def getInt(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='int') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getInt") < 0)) __PYX_ERR(0, 2120, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getInt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2120, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_236getInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_236getInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getInt", 0); + + /* "PyCafe.pyx":2121 + * ############################################################################ + * def getInt(self, handlePV, object cb=None): + * return self.get(handlePV, dt='int') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 2121, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2120 + * + * ############################################################################ + * def getInt(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='int') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2125 + * + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='float') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloat (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloat") < 0)) __PYX_ERR(0, 2125, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloat", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2125, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_238getFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_238getFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, CYTHON_UNUSED PyObject *__pyx_v_cb) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloat", 0); + + /* "PyCafe.pyx":2126 + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): + * return self.get(handlePV, dt='float') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 2126, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2125 + * + * ############################################################################ + * def getFloat(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='float') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2129 + * ############################################################################ + * + * def caget(self, str pv_name, str dt='native'): # <<<<<<<<<<<<<< + * return self.get(pv_name, dt) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241caget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241caget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv_name = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("caget (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_name_2,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "caget") < 0)) __PYX_ERR(0, 2129, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pv_name = ((PyObject*)values[0]); + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("caget", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2129, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.caget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv_name), (&PyUnicode_Type), 1, "pv_name", 1))) __PYX_ERR(0, 2129, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 2129, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_240caget(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv_name, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_240caget(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_dt) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("caget", 0); + + /* "PyCafe.pyx":2130 + * + * def caget(self, str pv_name, str dt='native'): + * return self.get(pv_name, dt) # <<<<<<<<<<<<<< + * + * def caput(self, str pv_name, pv_value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_dt}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_dt}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_pv_name); + __Pyx_GIVEREF(__pyx_v_pv_name); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pv_name); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_dt); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2129 + * ############################################################################ + * + * def caget(self, str pv_name, str dt='native'): # <<<<<<<<<<<<<< + * return self.get(pv_name, dt) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.caget", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2132 + * return self.get(pv_name, dt) + * + * def caput(self, str pv_name, pv_value): # <<<<<<<<<<<<<< + * return self.set(pv_name, pv_value) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243caput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243caput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv_name = 0; + PyObject *__pyx_v_pv_value = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("caput (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv_name_2,&__pyx_n_s_pv_value,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_name_2)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv_value)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("caput", 1, 2, 2, 1); __PYX_ERR(0, 2132, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "caput") < 0)) __PYX_ERR(0, 2132, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_pv_name = ((PyObject*)values[0]); + __pyx_v_pv_value = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("caput", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2132, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.caput", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv_name), (&PyUnicode_Type), 1, "pv_name", 1))) __PYX_ERR(0, 2132, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_242caput(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv_name, __pyx_v_pv_value); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_242caput(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv_name, PyObject *__pyx_v_pv_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("caput", 0); + + /* "PyCafe.pyx":2133 + * + * def caput(self, str pv_name, pv_value): + * return self.set(pv_name, pv_value) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_pv_value}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pv_name, __pyx_v_pv_value}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_pv_name); + __Pyx_GIVEREF(__pyx_v_pv_name); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pv_name); + __Pyx_INCREF(__pyx_v_pv_value); + __Pyx_GIVEREF(__pyx_v_pv_value); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_pv_value); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2132 + * return self.get(pv_name, dt) + * + * def caput(self, str pv_name, pv_value): # <<<<<<<<<<<<<< + * return self.set(pv_name, pv_value) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.caput", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2137 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[0] = ((PyObject *)__pyx_int_0); + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV); + if (value) { values[0] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 2137, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2137, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_244get(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244get(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + long __pyx_v_dtr; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_dtcheck; + PyObject *__pyx_v_bVal = 0; + int __pyx_v_encoding; + PyObject *__pyx_v_valStr = NULL; + CYTHON_UNUSED std::string __pyx_v_valstr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + std::string __pyx_t_15; + __Pyx_RefNannySetupContext("get", 0); + + /* "PyCafe.pyx":2138 + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): + * cdef str _METHOD = "get(handlePV, dt)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + __Pyx_INCREF(__pyx_kp_u_get_handlePV_dt); + __pyx_v__METHOD = __pyx_kp_u_get_handlePV_dt; + + /* "PyCafe.pyx":2140 + * cdef str _METHOD = "get(handlePV, dt)" + * + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * cdef int status + * cdef long dtr = 0 + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2140, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2142 + * cdef unsigned int handle = handlePV + * cdef int status + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * + * status = self.hh.getDataTypeNative(handle, dtr) + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2144 + * cdef long dtr = 0 + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2146 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2147 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2148 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2149 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2148 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2151 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2147 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2152 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2154 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2155 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2156 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2153 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2157 + * _pv_name=self._c_cafe.getPVFromHandle(handle), _error_code=status, + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2157, __pyx_L1_error) + + /* "PyCafe.pyx":2152 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2158 + * _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2146 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2160 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2161 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2162 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2163 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2164 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2163 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2166 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2168 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2169 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2170 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2171 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2173 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2167 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2175 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return None + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2175, __pyx_L1_error) + + /* "PyCafe.pyx":2166 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2177 + * raise _cafeException + * + * return None # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2161 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2180 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2181 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2180 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2182 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2184 + * if self._enable_exceptions: + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type_3, __pyx_n_u_cafe) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2185 + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2186 + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2187 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2188 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2183 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * type='cafe', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2189 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2189, __pyx_L1_error) + + /* "PyCafe.pyx":2182 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * type='cafe', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2190 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2160 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2193 + * + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2194 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->channelInfo.getClassNameAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_waveform, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = ((__pyx_t_2 != 0) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L13_bool_binop_done; + } + + /* "PyCafe.pyx":2195 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: # <<<<<<<<<<<<<< + * return self.getWFAsString(handle) + * + */ + __pyx_t_7 = __pyx_v_dtr; + __pyx_t_6 = (((__pyx_t_7 == DBR_CHAR) != 0) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L13_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_8 = __pyx_v_dt; + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_str, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = ((__pyx_t_6 != 0) != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L13_bool_binop_done:; + + /* "PyCafe.pyx":2194 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + if (__pyx_t_5) { + + /* "PyCafe.pyx":2196 + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) # <<<<<<<<<<<<<< + * + * cdef int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2194 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if str(self.channelInfo.getClassNameAsString()) in ['waveform'] \ # <<<<<<<<<<<<<< + * and dtr in [DBR_CHAR] and dt in ['str']: + * return self.getWFAsString(handle) + */ + } + + /* "PyCafe.pyx":2198 + * return self.getWFAsString(handle) + * + * cdef int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2199 + * + * cdef int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * cdef bytes bVal + */ + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_11; + + /* "PyCafe.pyx":2203 + * cdef bytes bVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2204 + * + * if dtcheck in [CAFE_STRING]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2205 + * if dtcheck in [CAFE_STRING]: + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getString(__pyx_v_handle, __pyx_v_self->valStr); + } + + /* "PyCafe.pyx":2204 + * + * if dtcheck in [CAFE_STRING]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L18; + } + __pyx_L18:; + } + } + + /* "PyCafe.pyx":2207 + * status = self._c_cafe.getString(handle, self.valStr) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * bVal = self.valStr + * encoding = False + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2208 + * + * if status == ICAFE_NORMAL: + * bVal = self.valStr # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + */ + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_bVal = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2209 + * if status == ICAFE_NORMAL: + * bVal = self.valStr + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":2210 + * bVal = self.valStr + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2211 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":2212 + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + * valStr = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2212, __pyx_L21_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2212, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_valStr = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2213 + * try: + * valStr = (bVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2211 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L26_try_end; + __pyx_L21_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":2214 + * valStr = (bVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L22_exception_handled; + } + goto __pyx_L23_except_error; + __pyx_L23_except_error:; + + /* "PyCafe.pyx":2211 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L22_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L26_try_end:; + } + + /* "PyCafe.pyx":2210 + * bVal = self.valStr + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":2216 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2217 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":2218 + * if not encoding: + * try: + * valStr = (bVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2218, __pyx_L28_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2218, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2219 + * try: + * valStr = (bVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2217 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L33_try_end; + __pyx_L28_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":2220 + * valStr = (bVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L29_exception_handled; + } + goto __pyx_L30_except_error; + __pyx_L30_except_error:; + + /* "PyCafe.pyx":2217 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L29_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L33_try_end:; + } + + /* "PyCafe.pyx":2216 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":2222 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2223 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":2224 + * if not encoding: + * try: + * valStr = (bVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2224, __pyx_L35_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2224, __pyx_L35_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2225 + * try: + * valStr = (bVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2223 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L40_try_end; + __pyx_L35_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":2226 + * valStr = (bVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L36_exception_handled; + } + goto __pyx_L37_except_error; + __pyx_L37_except_error:; + + /* "PyCafe.pyx":2223 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L36_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L40_try_end:; + } + + /* "PyCafe.pyx":2222 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":2228 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2229 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":2230 + * if not encoding: + * try: + * valStr = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2230, __pyx_L42_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2230, __pyx_L42_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2231 + * try: + * valStr = (bVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2229 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L47_try_end; + __pyx_L42_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":2232 + * valStr = (bVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L43_exception_handled; + } + goto __pyx_L44_except_error; + __pyx_L44_except_error:; + + /* "PyCafe.pyx":2229 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L43_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L47_try_end:; + } + + /* "PyCafe.pyx":2228 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":2234 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * valstr =self.valStr + * return valStr + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2235 + * pass + * if not encoding: + * valstr =self.valStr # <<<<<<<<<<<<<< + * return valStr + * + */ + __pyx_t_15 = __pyx_v_self->valStr; + __pyx_v_valstr = __pyx_t_15; + + /* "PyCafe.pyx":2234 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * valstr =self.valStr + * return valStr + */ + } + + /* "PyCafe.pyx":2236 + * if not encoding: + * valstr =self.valStr + * return valStr # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_valStr)) { __Pyx_RaiseUnboundLocalError("valStr"); __PYX_ERR(0, 2236, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_valStr); + __pyx_r = __pyx_v_valStr; + goto __pyx_L0; + + /* "PyCafe.pyx":2207 + * status = self._c_cafe.getString(handle, self.valStr) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * bVal = self.valStr + * encoding = False + */ + } + + /* "PyCafe.pyx":2203 + * cdef bytes bVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2238 + * return valStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":2239 + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2240 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLong(__pyx_v_handle, __pyx_v_self->valInt); + } + + /* "PyCafe.pyx":2239 + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L51; + } + __pyx_L51:; + } + } + + /* "PyCafe.pyx":2241 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2242 + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2241 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + } + + /* "PyCafe.pyx":2238 + * return valStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":2243 + * if status == ICAFE_NORMAL: + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2244 + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2245 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDouble(__pyx_v_handle, __pyx_v_self->valFloat); + } + + /* "PyCafe.pyx":2244 + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L55; + } + __pyx_L55:; + } + } + + /* "PyCafe.pyx":2247 + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2248 + * + * if status == ICAFE_NORMAL: + * return self.valFloat # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2247 + * status = self._c_cafe.getDouble(handle, self.valFloat) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck == CAFE_ENUM: + */ + } + + /* "PyCafe.pyx":2243 + * if status == ICAFE_NORMAL: + * return self.valInt + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDouble(handle, self.valFloat) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":2251 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2252 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2253 + * if self._c_cafe.isEnum(handle): + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getString(__pyx_v_handle, __pyx_v_self->valStr); + } + + /* "PyCafe.pyx":2252 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L60; + } + __pyx_L60:; + } + } + + /* "PyCafe.pyx":2254 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2255 + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2254 + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":2251 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getString(handle, self.valStr) + */ + goto __pyx_L57; + } + + /* "PyCafe.pyx":2257 + * return self.valStr + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2258 + * else: + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLong(__pyx_v_handle, __pyx_v_self->valInt); + } + + /* "PyCafe.pyx":2257 + * return self.valStr + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L64; + } + __pyx_L64:; + } + } + + /* "PyCafe.pyx":2259 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2260 + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def get should never appear!") + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2259 + * with nogil: + * status = self._c_cafe.getLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + } + } + __pyx_L57:; + + /* "PyCafe.pyx":2249 + * if status == ICAFE_NORMAL: + * return self.valFloat + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + break; + default: + + /* "PyCafe.pyx":2262 + * return self.valInt + * else: + * print("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2263 + * else: + * print("This line in PyCafe def get should never appear!") + * return None # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":2265 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2266 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2267 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2268 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2267 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L68; + } + + /* "PyCafe.pyx":2270 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L68:; + + /* "PyCafe.pyx":2266 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2271 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2273 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2274 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2275 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2276 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2272 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2277 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2277, __pyx_L1_error) + + /* "PyCafe.pyx":2271 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2278 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2265 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2137 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XDECREF(__pyx_v_valStr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2285 + * + * ############################################################################ + * def getIntList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247getIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247getIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_246getIntList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_246getIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getIntList", 0); + + /* "PyCafe.pyx":2286 + * ############################################################################ + * def getIntList(self, handlePV): + * return self.getList(handlePV, 'int') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2285 + * + * ############################################################################ + * def getIntList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2289 + * + * ############################################################################ + * def getFloatList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_248getFloatList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_248getFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getFloatList", 0); + + /* "PyCafe.pyx":2290 + * ############################################################################ + * def getFloatList(self, handlePV): + * return self.getList(handlePV, 'float') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2289 + * + * ############################################################################ + * def getFloatList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2293 + * + * ############################################################################ + * def getStrList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_250getStrList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_250getStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getStrList", 0); + + /* "PyCafe.pyx":2294 + * ############################################################################ + * def getStrList(self, handlePV): + * return self.getList(handlePV, 'str') # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2293 + * + * ############################################################################ + * def getStrList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2298 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getList") < 0)) __PYX_ERR(0, 2298, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2298, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 2298, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_252getList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_252getList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + long __pyx_v_dtr; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_dtcheck; + CYTHON_UNUSED unsigned int __pyx_v_nelemNative; + unsigned int __pyx_v_nelemClient; + CYTHON_UNUSED unsigned int __pyx_v_nelemRequest; + unsigned int __pyx_v_nelemMethod; + dbr_string_t *__pyx_v_valStringArray; + dbr_long_t *__pyx_v_valIntArray; + dbr_enum_t *__pyx_v_valUShortArray; + double *__pyx_v_valDoubleArray; + float *__pyx_v_valFloatArray; + short *__pyx_v_valShortArray; + PyObject *__pyx_v_bytesVal = 0; + PyObject *__pyx_v_ll = NULL; + long __pyx_v_i; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + dbr_char_t *__pyx_v_valCharArray; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + unsigned int __pyx_t_7; + long __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + __Pyx_RefNannySetupContext("getList", 0); + + /* "PyCafe.pyx":2299 + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * + */ + __Pyx_INCREF(__pyx_n_u_getList); + __pyx_v__METHOD = __pyx_n_u_getList; + + /* "PyCafe.pyx":2300 + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2300, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2303 + * + * cdef int status + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * + * status = self.hh.getDataTypeNative(handle, dtr) + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2305 + * cdef long dtr = 0 + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2307 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2308 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2309 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2310 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2309 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2312 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2308 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2313 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2315 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + + /* "PyCafe.pyx":2316 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2317 + * _type='CafeError', _source=_METHOD, + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2318 + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2319 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2314 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _handle=handle, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2320 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2320, __pyx_L1_error) + + /* "PyCafe.pyx":2313 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":2322 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2307 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2324 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2325 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((!(__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2326 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2327 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2328 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2327 + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2330 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2332 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2333 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2334 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2335 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2337 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(0, 2332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2331 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2339 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2339, __pyx_L1_error) + + /* "PyCafe.pyx":2330 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2340 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # This paragraph should be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_3, 0, Py_None); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2325 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if not self._c_cafe.isChannelConnected(handle): # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2343 + * + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2344 + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2343 + * + * # This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2345 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2347 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2348 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2349 + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2350 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2351 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2346 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD,_handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2352 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2352, __pyx_L1_error) + + /* "PyCafe.pyx":2345 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD,_handle=handle, + */ + } + + /* "PyCafe.pyx":2353 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * #JC FEB 2022 must be int as CAFE_TYPENOTCONN is -1 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2324 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if not self._c_cafe.isChannelConnected(handle): + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2356 + * + * #JC FEB 2022 must be int as CAFE_TYPENOTCONN is -1 + * cdef int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2357 + * #JC FEB 2022 must be int as CAFE_TYPENOTCONN is -1 + * cdef int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * #print ("dtcheck input/native", dtcheck, dt, dtr) + */ + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2357, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_6; + + /* "PyCafe.pyx":2361 + * #print ("dtcheck input/native", dtcheck, dt, dtr) + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + */ + __pyx_v_nelemNative = __pyx_v_self->hh.getNelemNative(__pyx_v_handle); + + /* "PyCafe.pyx":2362 + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + */ + __pyx_v_nelemClient = __pyx_v_self->hh.getNelemClient(__pyx_v_handle); + + /* "PyCafe.pyx":2363 + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemMethod = nelemClient + */ + __pyx_v_nelemRequest = __pyx_v_self->hh.getNelemRequest(__pyx_v_handle); + + /* "PyCafe.pyx":2365 + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + * cdef unsigned int nelemMethod = nelemClient # <<<<<<<<<<<<<< + * + * cdef dbr_string_t * valStringArray + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2379 + * cdef bytes bytesVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2381 + * if dtcheck in [CAFE_STRING]: + * + * valStringArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_string_t)) + * + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2384 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2385 + * + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_valStringArray); + } + + /* "PyCafe.pyx":2384 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2387 + * status = self._c_cafe.getDbrStringArray(handle, valStringArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2388 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * + * bytesVal = ( valStringArray[i]) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2390 + * for i in range(0, nelemMethod): + * + * bytesVal = ( valStringArray[i]) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_valStringArray[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2391 + * + * bytesVal = ( valStringArray[i]) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":2392 + * bytesVal = ( valStringArray[i]) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2393 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "PyCafe.pyx":2394 + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2394, __pyx_L18_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2394, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2395 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2393 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L25_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2396 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_6) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L19_exception_handled; + } + goto __pyx_L20_except_error; + __pyx_L20_except_error:; + + /* "PyCafe.pyx":2393 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L25_try_end:; + } + + /* "PyCafe.pyx":2392 + * bytesVal = ( valStringArray[i]) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":2398 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2399 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafe.pyx":2400 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2400, __pyx_L27_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __pyx_L27_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2401 + * try: + * strVal = (bytesVal).decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2399 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L34_try_end; + __pyx_L27_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2402 + * strVal = (bytesVal).decode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_6) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L28_exception_handled; + } + goto __pyx_L29_except_error; + __pyx_L29_except_error:; + + /* "PyCafe.pyx":2399 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L28_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + __pyx_L34_try_end:; + } + + /* "PyCafe.pyx":2398 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + } + + /* "PyCafe.pyx":2404 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2405 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * except UnicodeDecodeError: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "PyCafe.pyx":2406 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_16') # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2406, __pyx_L36_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2406, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2405 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * except UnicodeDecodeError: + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L43_try_end; + __pyx_L36_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2407 + * try: + * strVal = (bytesVal).decode('utf_16') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_6) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L37_exception_handled; + } + goto __pyx_L38_except_error; + __pyx_L38_except_error:; + + /* "PyCafe.pyx":2405 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * except UnicodeDecodeError: + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L37_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L43_try_end:; + } + + /* "PyCafe.pyx":2404 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + } + + /* "PyCafe.pyx":2409 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = valStringArray[i] + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2410 + * pass + * if not encoding: + * strVal = valStringArray[i] # <<<<<<<<<<<<<< + * + * ll.append(strVal) + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2409 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = valStringArray[i] + * + */ + } + + /* "PyCafe.pyx":2412 + * strVal = valStringArray[i] + * + * ll.append(strVal) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status == ICAFE_NORMAL: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 2412, __pyx_L1_error) } + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_v_strVal); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2412, __pyx_L1_error) + } + + /* "PyCafe.pyx":2413 + * + * ll.append(strVal) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":2414 + * ll.append(strVal) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2415 + * free(valStringArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_CHAR]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2414 + * ll.append(strVal) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2379 + * cdef bytes bytesVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":2419 + * elif dtcheck in [CAFE_CHAR]: + * + * valCharArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_char_t)) + * + */ + __pyx_v_valCharArray = ((dbr_char_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_char_t))))); + + /* "PyCafe.pyx":2422 + * nelemMethod * sizeof(dbr_char_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2423 + * + * with nogil: + * status = self._c_cafe.getCharArray(handle, valCharArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCharArray(__pyx_v_handle, __pyx_v_valCharArray); + } + + /* "PyCafe.pyx":2422 + * nelemMethod * sizeof(dbr_char_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L48; + } + __pyx_L48:; + } + } + + /* "PyCafe.pyx":2425 + * status = self._c_cafe.getCharArray(handle, valCharArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2426 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valCharArray[i]) + * free(valCharArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2427 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) # <<<<<<<<<<<<<< + * free(valCharArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = __Pyx_PyInt_From_dbr_char_t((__pyx_v_valCharArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2428 + * for i in range(0, nelemMethod): + * ll.append(valCharArray[i]) + * free(valCharArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valCharArray); + + /* "PyCafe.pyx":2429 + * ll.append(valCharArray[i]) + * free(valCharArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2430 + * free(valCharArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2429 + * ll.append(valCharArray[i]) + * free(valCharArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2417 + * return ll + * + * elif dtcheck in [CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * valCharArray = malloc( + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":2434 + * elif dtcheck in [CAFE_LONG]: + * + * valIntArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_long_t)) + * + */ + __pyx_v_valIntArray = ((dbr_long_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_long_t))))); + + /* "PyCafe.pyx":2437 + * nelemMethod * sizeof(dbr_long_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2438 + * + * with nogil: + * status = self._c_cafe.getLongArray(handle, valIntArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLongArray(__pyx_v_handle, __pyx_v_valIntArray); + } + + /* "PyCafe.pyx":2437 + * nelemMethod * sizeof(dbr_long_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L54; + } + __pyx_L54:; + } + } + + /* "PyCafe.pyx":2440 + * status = self._c_cafe.getLongArray(handle, valIntArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2441 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valIntArray[i]) + * free(valIntArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2442 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) # <<<<<<<<<<<<<< + * free(valIntArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = __Pyx_PyInt_From_dbr_long_t((__pyx_v_valIntArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2442, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2443 + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + * free(valIntArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valIntArray); + + /* "PyCafe.pyx":2444 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2445 + * free(valIntArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2444 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2432 + * return ll + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * valIntArray = malloc( + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2449 + * elif dtcheck in [CAFE_SHORT]: + * + * valShortArray = malloc(nelemMethod * sizeof(short)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valShortArray = ((short *)malloc((__pyx_v_nelemMethod * (sizeof(short))))); + + /* "PyCafe.pyx":2451 + * valShortArray = malloc(nelemMethod * sizeof(short)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2452 + * + * with nogil: + * status = self._c_cafe.getShortArray(handle, valShortArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getShortArray(__pyx_v_handle, __pyx_v_valShortArray); + } + + /* "PyCafe.pyx":2451 + * valShortArray = malloc(nelemMethod * sizeof(short)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L60; + } + __pyx_L60:; + } + } + + /* "PyCafe.pyx":2454 + * status = self._c_cafe.getShortArray(handle, valShortArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2455 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valShortArray[i]) + * free(valShortArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2456 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) # <<<<<<<<<<<<<< + * free(valShortArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = __Pyx_PyInt_From_short((__pyx_v_valShortArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2456, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2457 + * for i in range(0, nelemMethod): + * ll.append(valShortArray[i]) + * free(valShortArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valShortArray); + + /* "PyCafe.pyx":2458 + * ll.append(valShortArray[i]) + * free(valShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * elif dtcheck in [CAFE_FLOAT]: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2459 + * free(valShortArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * elif dtcheck in [CAFE_FLOAT]: + * ''' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2458 + * ll.append(valShortArray[i]) + * free(valShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * elif dtcheck in [CAFE_FLOAT]: + */ + } + + /* "PyCafe.pyx":2447 + * return ll + * + * elif dtcheck in [CAFE_SHORT]: # <<<<<<<<<<<<<< + * + * valShortArray = malloc(nelemMethod * sizeof(short)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":2473 + * + * # Speedier than vectors + * valFloatArray = malloc(nelemMethod * sizeof(float)) # <<<<<<<<<<<<<< + * # start=time.time() + * # for i in range (0, 10000): + */ + __pyx_v_valFloatArray = ((float *)malloc((__pyx_v_nelemMethod * (sizeof(float))))); + + /* "PyCafe.pyx":2477 + * # for i in range (0, 10000): + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, valFloatArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2478 + * + * with nogil: + * status = self._c_cafe.getFloatArray(handle, valFloatArray) # <<<<<<<<<<<<<< + * + * # end=time.time() + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getFloatArray(__pyx_v_handle, __pyx_v_valFloatArray); + } + + /* "PyCafe.pyx":2477 + * # for i in range (0, 10000): + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, valFloatArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L66; + } + __pyx_L66:; + } + } + + /* "PyCafe.pyx":2483 + * #print ("END TIME FLOAT", end - start) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2484 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valFloatArray[i]) + * free(valFloatArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2485 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) # <<<<<<<<<<<<<< + * free(valFloatArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_valFloatArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2486 + * for i in range(0, nelemMethod): + * ll.append(valFloatArray[i]) + * free(valFloatArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valFloatArray); + + /* "PyCafe.pyx":2487 + * ll.append(valFloatArray[i]) + * free(valFloatArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2488 + * free(valFloatArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2487 + * ll.append(valFloatArray[i]) + * free(valFloatArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2460 + * if status == ICAFE_NORMAL: + * return ll + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * ''' + * valFloatVector.reserve(nelemMethod) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2492 + * elif dtcheck in [CAFE_DOUBLE]: + * + * valDoubleArray = malloc(nelemMethod * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valDoubleArray = ((double *)malloc((__pyx_v_nelemMethod * (sizeof(double))))); + + /* "PyCafe.pyx":2494 + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2495 + * + * with nogil: + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_valDoubleArray); + } + + /* "PyCafe.pyx":2494 + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L72; + } + __pyx_L72:; + } + } + + /* "PyCafe.pyx":2497 + * status = self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2498 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2499 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) # <<<<<<<<<<<<<< + * free(valDoubleArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_valDoubleArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2499, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2500 + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valDoubleArray); + + /* "PyCafe.pyx":2501 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2502 + * free(valDoubleArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_ENUM: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2501 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":2490 + * return ll + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * valDoubleArray = malloc(nelemMethod * sizeof(double)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":2507 + * + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( + * nelemMethod * sizeof(dbr_string_t)) + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2508 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * valStringArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_string_t)) + * + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2511 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray( + * handle, valStringArray) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2512 + * + * with nogil: + * status = self._c_cafe.getDbrStringArray( # <<<<<<<<<<<<<< + * handle, valStringArray) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_valStringArray); + } + + /* "PyCafe.pyx":2511 + * nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray( + * handle, valStringArray) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L79; + } + __pyx_L79:; + } + } + + /* "PyCafe.pyx":2515 + * handle, valStringArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2516 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valStringArray[i]) + * free(valStringArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2517 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2518 + * for i in range(0, nelemMethod): + * ll.append(valStringArray[i]) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":2519 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2520 + * free(valStringArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * else: + * valUShortArray = malloc( + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2519 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + } + + /* "PyCafe.pyx":2507 + * + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( + * nelemMethod * sizeof(dbr_string_t)) + */ + goto __pyx_L76; + } + + /* "PyCafe.pyx":2522 + * return ll + * else: + * valUShortArray = malloc( # <<<<<<<<<<<<<< + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: + */ + /*else*/ { + + /* "PyCafe.pyx":2523 + * else: + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getUShortArray( + */ + __pyx_v_valUShortArray = ((dbr_enum_t *)malloc((__pyx_v_nelemMethod * (sizeof(dbr_enum_t))))); + + /* "PyCafe.pyx":2524 + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getUShortArray( + * handle, valUShortArray) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2525 + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: + * status = self._c_cafe.getUShortArray( # <<<<<<<<<<<<<< + * handle, valUShortArray) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getUShortArray(__pyx_v_handle, __pyx_v_valUShortArray); + } + + /* "PyCafe.pyx":2524 + * valUShortArray = malloc( + * nelemMethod * sizeof(dbr_enum_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getUShortArray( + * handle, valUShortArray) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L85; + } + __pyx_L85:; + } + } + + /* "PyCafe.pyx":2528 + * handle, valUShortArray) + * + * ll = [] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_ll = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2529 + * + * ll = [] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valUShortArray[i]) + * free(valUShortArray) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_7 = __pyx_t_1; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":2530 + * ll = [] + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) # <<<<<<<<<<<<<< + * free(valUShortArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_4 = __Pyx_PyInt_From_dbr_enum_t((__pyx_v_valUShortArray[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_4); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2531 + * for i in range(0, nelemMethod): + * ll.append(valUShortArray[i]) + * free(valUShortArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valUShortArray); + + /* "PyCafe.pyx":2532 + * ll.append(valUShortArray[i]) + * free(valUShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * # Will not happen; already covered above + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2533 + * free(valUShortArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":2532 + * ll.append(valUShortArray[i]) + * free(valUShortArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * # Will not happen; already covered above + */ + } + } + __pyx_L76:; + + /* "PyCafe.pyx":2504 + * return ll + * + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * # if enum, string taken as native + */ + break; + case CAFE_NO_ACCESS: + + /* "PyCafe.pyx":2535 + * return ll + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + */ + case CAFE_TYPENOTCONN: + + /* "PyCafe.pyx":2536 + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * print("Channel", self._c_cafe.getPVFromHandle( # <<<<<<<<<<<<<< + * handle), " not connected") + * return None + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_n_u_Channel); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_not_connected); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_not_connected); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2538 + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + * return None # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def getAsList should never appear!") + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2535 + * return ll + * # Will not happen; already covered above + * elif dtcheck in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * print("Channel", self._c_cafe.getPVFromHandle( + * handle), " not connected") + */ + break; + default: + + /* "PyCafe.pyx":2540 + * return None + * else: + * print("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2541 + * else: + * print("This line in PyCafe def getAsList should never appear!") + * return None # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":2543 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2544 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2545 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2546 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2545 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":2548 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions is False: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L91:; + + /* "PyCafe.pyx":2544 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2549 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = ((__pyx_v_self->_enable_exceptions == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2551 + * if self._enable_exceptions is False: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2552 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2553 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2554 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2555 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2550 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2556 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return None + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2556, __pyx_L1_error) + + /* "PyCafe.pyx":2549 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions is False: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2558 + * raise _cafeException + * + * return None # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":2543 + * return None + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2298 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2562 + * ################################################################################## + * + * def getStrArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='str', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_255getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_255getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStrArray") < 0)) __PYX_ERR(0, 2562, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStrArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2562, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 2562, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_254getStrArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_254getStrArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrArray", 0); + + /* "PyCafe.pyx":2563 + * + * def getStrArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='str', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 2563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 2563, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2562 + * ################################################################################## + * + * def getStrArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='str', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2567 + * + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='int', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_257getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_257getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIntArray") < 0)) __PYX_ERR(0, 2567, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getIntArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2567, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 2567, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_256getIntArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_256getIntArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntArray", 0); + + /* "PyCafe.pyx":2568 + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='int', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 2568, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 2568, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2567 + * + * ############################################################################ + * def getIntArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='int', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2572 + * + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='float', art=art) + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloatArray") < 0)) __PYX_ERR(0, 2572, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloatArray", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2572, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 2572, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_258getFloatArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_258getFloatArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatArray", 0); + + /* "PyCafe.pyx":2573 + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): + * return self.getArray(handlePV, dt='float', art=art) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 2573, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 2573, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2572 + * + * ############################################################################ + * def getFloatArray(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='float', art=art) + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2578 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,&__pyx_n_s_art,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getArray") < 0)) __PYX_ERR(0, 2578, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_art = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getArray", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2578, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 2578, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 2578, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_260getArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_260getArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + short *__pyx_v_i16val; + dbr_char_t *__pyx_v_ui8val; + int *__pyx_v_ival; + double *__pyx_v_dval; + float *__pyx_v_fval; + dbr_string_t *__pyx_v_sval; + __Pyx_memviewslice __pyx_v_mvShort = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvDouble = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvFloat = { 0, 0, { 0 }, { 0 }, { 0 } }; + long __pyx_v_dtr; + int __pyx_v_status; + unsigned int __pyx_v_i; + unsigned int __pyx_v_ij; + arrayobject *__pyx_v_a = 0; + __Pyx_memviewslice __pyx_v_mvUInt8 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt8 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvUInt32 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt32 = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_dtcheck; + CYTHON_UNUSED unsigned int __pyx_v_nelemNative; + unsigned int __pyx_v_nelemClient; + CYTHON_UNUSED unsigned int __pyx_v_nelemRequest; + unsigned int __pyx_v_nelemMethod; + unsigned int __pyx_v_nelemMemory; + PyObject *__pyx_v_bVal = 0; + CYTHON_UNUSED PyObject *__pyx_v_locallist = NULL; + PyObject *__pyx_v_mvStr = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_arrayArray = NULL; + PyObject *__pyx_v_ctypesArray = NULL; + PyObject *__pyx_v_mvUInt8n = NULL; + PyObject *__pyx_v_ctypesArray16 = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + unsigned int __pyx_t_11; + unsigned int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + int __pyx_t_17; + __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_19; + __Pyx_memviewslice __pyx_t_20 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_22; + size_t __pyx_t_23; + size_t __pyx_t_24; + size_t __pyx_t_25; + size_t __pyx_t_26; + size_t __pyx_t_27; + size_t __pyx_t_28; + size_t __pyx_t_29; + size_t __pyx_t_30; + __Pyx_memviewslice __pyx_t_31 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_32; + __Pyx_memviewslice __pyx_t_33 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_34; + __Pyx_memviewslice __pyx_t_35 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_36; + size_t __pyx_t_37; + size_t __pyx_t_38; + __Pyx_memviewslice __pyx_t_39 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_40; + size_t __pyx_t_41; + size_t __pyx_t_42; + __Pyx_memviewslice __pyx_t_43 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_44; + size_t __pyx_t_45; + size_t __pyx_t_46; + __Pyx_RefNannySetupContext("getArray", 0); + + /* "PyCafe.pyx":2598 + * + * ##start = time.time() + * cdef str _METHOD = "getArray" # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * ''' + */ + __Pyx_INCREF(__pyx_n_u_getArray); + __pyx_v__METHOD = __pyx_n_u_getArray; + + /* "PyCafe.pyx":2599 + * ##start = time.time() + * cdef str _METHOD = "getArray" + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * ''' + * cdef unsigned int handle = 0 + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":2626 + * # str [:,::1] mvStr + * cnp.ndarray arr + * long dtr = 0 # <<<<<<<<<<<<<< + * int status + * # cvarray mvDoubleArray + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2648 + * # cdef PVDataHolder pvd + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":2650 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2651 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2652 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2653 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":2652 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":2655 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L5:; + + /* "PyCafe.pyx":2651 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2656 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2658 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + + /* "PyCafe.pyx":2659 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2660 + * _type='CafeError', _source=_METHOD, + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2661 + * _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2662 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2657 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _handle=handle, + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2663 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2663, __pyx_L1_error) + + /* "PyCafe.pyx":2656 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + } + + /* "PyCafe.pyx":2665 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2650 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2667 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_2 = 1; + break; + default: + __pyx_t_2 = 0; + break; + } + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2668 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2669 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":2670 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2671 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2670 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":2673 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2675 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_handle, __pyx_t_3) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2676 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pv_name, __pyx_t_3) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2677 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_code, __pyx_t_3) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2678 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_text, __pyx_t_3) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2680 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_t_3) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2674 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2682 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2682, __pyx_L1_error) + + /* "PyCafe.pyx":2673 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2683 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_3, 0, Py_None); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2668 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":2686 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2687 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2686 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":2688 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_5 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2690 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle, __pyx_t_4) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2691 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pv_name, __pyx_t_4) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2692 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_4 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_code, __pyx_t_4) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2693 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_text, __pyx_t_4) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2694 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_t_4) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2689 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2695 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 2695, __pyx_L1_error) + + /* "PyCafe.pyx":2688 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":2696 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_4, 0, Py_None); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2667 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":2698 + * return [None] + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtr) + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2700 + * cdef unsigned int dtcheck = dtr + * + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + */ + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2700, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafe.pyx":2702 + * dtcheck = getMatchedDataType(dt, dtr) + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + */ + __pyx_v_nelemNative = __pyx_v_self->hh.getNelemNative(__pyx_v_handle); + + /* "PyCafe.pyx":2703 + * + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) # <<<<<<<<<<<<<< + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + */ + __pyx_v_nelemClient = __pyx_v_self->hh.getNelemClient(__pyx_v_handle); + + /* "PyCafe.pyx":2704 + * cdef unsigned int nelemNative = self.hh.getNelemNative(handle) + * cdef unsigned int nelemClient = self.hh.getNelemClient(handle) + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemMethod = nelemClient + */ + __pyx_v_nelemRequest = __pyx_v_self->hh.getNelemRequest(__pyx_v_handle); + + /* "PyCafe.pyx":2706 + * cdef unsigned int nelemRequest = self.hh.getNelemRequest(handle) + * + * cdef unsigned int nelemMethod = nelemClient # <<<<<<<<<<<<<< + * # previously nelemNative - has to be at least size of nelemClient + * cdef unsigned int nelemMemory = nelemClient + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2708 + * cdef unsigned int nelemMethod = nelemClient + * # previously nelemNative - has to be at least size of nelemClient + * cdef unsigned int nelemMemory = nelemClient # <<<<<<<<<<<<<< + * + * #print('native', self.hh.getNelemNative(handle)) + */ + __pyx_v_nelemMemory = __pyx_v_nelemClient; + + /* "PyCafe.pyx":2725 + * ##print ("PRE-AMBLE", end - start) + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + case CAFE_ENUM: + + /* "PyCafe.pyx":2726 + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, sval) + */ + __pyx_v_sval = ((char (*)[40])malloc((__pyx_v_nelemMemory * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":2727 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, sval) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2728 + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + * status = self._c_cafe.getDbrStringArray(handle, sval) # <<<<<<<<<<<<<< + * + * # http://cython.readthedocs.org/en/latest/src/tutorial/numpy.html + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_sval); + } + + /* "PyCafe.pyx":2727 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getDbrStringArray(handle, sval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2733 + * # Some data types are not yet supported, like boolean arrays and string arrays. + * + * locallist = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_locallist = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2736 + * + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2738 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2738, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L17_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2742 + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + * + * mvStr = np.empty(nelemMethod, dtype=(np.str_, 40)) # <<<<<<<<<<<<<< + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2745 + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + * + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * + * encoding = False + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":2747 + * for i in range(0, nelemMethod): + * + * encoding = False # <<<<<<<<<<<<<< + * bVal = ( sval[i]) + * + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":2748 + * + * encoding = False + * bVal = ( sval[i]) # <<<<<<<<<<<<<< + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + */ + __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_sval[__pyx_v_i]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_v_bVal, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2750 + * bVal = ( sval[i]) + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * mvStr[i] = (bVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2750, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2751 + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * mvStr[i] = (bVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":2752 + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + * mvStr[i] = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2752, __pyx_L25_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L25_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2752, __pyx_L25_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2753 + * try: + * mvStr[i] = (bVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2751 + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * mvStr[i] = (bVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L32_try_end; + __pyx_L25_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2754 + * mvStr[i] = (bVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_16) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L26_exception_handled; + } + goto __pyx_L27_except_error; + __pyx_L27_except_error:; + + /* "PyCafe.pyx":2751 + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * mvStr[i] = (bVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L26_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_L32_try_end:; + } + + /* "PyCafe.pyx":2750 + * bVal = ( sval[i]) + * + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * mvStr[i] = (bVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":2756 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * mvStr[i] = bVal.decode('utf_8') + */ + __pyx_t_5 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2757 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + /*try:*/ { + + /* "PyCafe.pyx":2758 + * if not encoding: + * try: + * mvStr[i] = bVal.decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2758, __pyx_L34_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2758, __pyx_L34_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2758, __pyx_L34_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2759 + * try: + * mvStr[i] = bVal.decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2757 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L41_try_end; + __pyx_L34_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2760 + * mvStr[i] = bVal.decode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_16) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L35_exception_handled; + } + goto __pyx_L36_except_error; + __pyx_L36_except_error:; + + /* "PyCafe.pyx":2757 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); + goto __pyx_L1_error; + __pyx_L35_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); + __pyx_L41_try_end:; + } + + /* "PyCafe.pyx":2756 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * mvStr[i] = bVal.decode('utf_8') + */ + } + + /* "PyCafe.pyx":2762 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * mvStr[i] = bVal.decode('utf_16') + */ + __pyx_t_5 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2763 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":2764 + * if not encoding: + * try: + * mvStr[i] = bVal.decode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 2764, __pyx_L43_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2764, __pyx_L43_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2764, __pyx_L43_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2765 + * try: + * mvStr[i] = bVal.decode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":2763 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L50_try_end; + __pyx_L43_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2766 + * mvStr[i] = bVal.decode('utf_16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_16) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L44_exception_handled; + } + goto __pyx_L45_except_error; + __pyx_L45_except_error:; + + /* "PyCafe.pyx":2763 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * mvStr[i] = bVal.decode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L44_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); + __pyx_L50_try_end:; + } + + /* "PyCafe.pyx":2762 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * mvStr[i] = bVal.decode('utf_16') + */ + } + + /* "PyCafe.pyx":2769 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * mvStr[i] = sval[i] + * + */ + __pyx_t_5 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2770 + * + * if not encoding: + * mvStr[i] = sval[i] # <<<<<<<<<<<<<< + * + * # locallist.append(sval[i]) + */ + __pyx_t_3 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2770, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2769 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * mvStr[i] = sval[i] + * + */ + } + } + + /* "PyCafe.pyx":2774 + * # locallist.append(sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * + * return np.array(mvStr) + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2776 + * free(sval) + * + * return np.array(mvStr) # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_mvStr) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_mvStr); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2738 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.string','np.str','np.unicode','np.string_','np.str_','np.unicode_']: + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2778 + * return np.array(mvStr) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2778, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L52_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2778, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L52_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2778, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L52_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2779 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2780 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2779, __pyx_L1_error) + + /* "PyCafe.pyx":2779 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvStr = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2782 + * np.str_, 40), order='C') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvStr[ij] = str(sval[ij]) + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2783 + * + * for ij in range(0, nelemMethod): + * mvStr[ij] = str(sval[ij]) # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2783, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2784 + * for ij in range(0, nelemMethod): + * mvStr[ij] = str(sval[ij]) + * free(sval) # <<<<<<<<<<<<<< + * + * return memoryview(mvStr) + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2786 + * free(sval) + * + * return memoryview(mvStr) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_mvStr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2778 + * return np.array(mvStr) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2788 + * return memoryview(mvStr) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2788, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L57_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2788, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L57_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2789 + * + * elif art in ['array', 'array.array']: + * print( # <<<<<<<<<<<<<< + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2793 + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + * #arrayArray=array.array('u', 'hello \u2641') + * arrayArray = [] # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_arrayArray = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2794 + * #arrayArray=array.array('u', 'hello \u2641') + * arrayArray = [] + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(str(sval[ij])) + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2795 + * arrayArray = [] + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) # <<<<<<<<<<<<<< + * free(sval) + * return arrayArray + */ + __pyx_t_4 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_arrayArray, __pyx_t_3); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 2795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2796 + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) + * free(sval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2797 + * arrayArray.append(str(sval[ij])) + * free(sval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2788 + * return memoryview(mvStr) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * print( + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2799 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2799, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L61_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2799, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L61_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2801 + * elif art in ['ctypes', 'ctype']: + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_ctypesArray = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2802 + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2803 + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') # <<<<<<<<<<<<<< + * free(sval) + * return ctypesArray + */ + __pyx_t_8 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2803, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2804 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2805 + * ctypesArray[ij] = (sval[ij]).encode('utf-8') + * free(sval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":2799 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * # c_wchar_p is unicode! + * ctypesArray = (ctypes.c_char_p*nelemMethod)() + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":2808 + * + * else: + * print("Unknown array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2809 + * else: + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Unknown_array_type_in_user_reque); + __Pyx_GIVEREF(__pyx_kp_u_Unknown_array_type_in_user_reque); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unknown_array_type_in_user_reque); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2808 + * + * else: + * print("Unknown array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2810 + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2811 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2812 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2813 + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2812, __pyx_L1_error) + + /* "PyCafe.pyx":2812 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( # <<<<<<<<<<<<<< + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2814 + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvStr[ij] = sval[ij] + * free(sval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2815 + * np.str_, 40), order='C') + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] # <<<<<<<<<<<<<< + * free(sval) + * + */ + __pyx_t_9 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2815, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2816 + * for ij in range(0, nelemMethod): + * mvStr[ij] = sval[ij] + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2818 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_CHAR]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + } + __pyx_L16:; + + /* "PyCafe.pyx":2736 + * + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":2725 + * ##print ("PRE-AMBLE", end - start) + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = < char[40]* > malloc(nelemMemory * sizeof(dbr_string_t)) + * with nogil: + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":2824 + * + * ##start=time.time() + * ui8val = malloc(nelemMemory * sizeof(np.uint8)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_ui8val = ((dbr_char_t *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2826 + * ui8val = malloc(nelemMemory * sizeof(np.uint8)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, ui8val) + * ##end=time.time() + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2827 + * + * with nogil: + * status = self._c_cafe.getCharArray(handle, ui8val) # <<<<<<<<<<<<<< + * ##end=time.time() + * ##print ("END TIME CHAR", end - start) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCharArray(__pyx_v_handle, __pyx_v_ui8val); + } + + /* "PyCafe.pyx":2826 + * ui8val = malloc(nelemMemory * sizeof(np.uint8)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCharArray(handle, ui8val) + * ##end=time.time() + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L69; + } + __pyx_L69:; + } + } + + /* "PyCafe.pyx":2838 + * + * #nelemMethod = min(len(ui8val), nelemMemory) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2841 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L72_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2843 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L78_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L78_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L78_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2843, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L78_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2844 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2845 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":2844 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2845 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 2845, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2845, __pyx_L1_error) + + /* "PyCafe.pyx":2844 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 2844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":2846 + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2847 + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return np.array(mvShort) + */ + __pyx_t_19 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2847, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_19)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2848 + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return np.array(mvShort) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2849 + * mvShort[ij] = ui8val[ij] + * free(ui8val) + * return np.array(mvShort) # <<<<<<<<<<<<<< + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_10 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2843 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + goto __pyx_L77; + } + + /* "PyCafe.pyx":2851 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L84_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2852 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * #for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2853 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * #for ij in range(0, nelemMethod): + * # mvInt8[ij] = ui8val[ij] + */ + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "PyCafe.pyx":2852 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * #for ij in range(0, nelemMethod): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":2853 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * #for ij in range(0, nelemMethod): + * # mvInt8[ij] = ui8val[ij] + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) + + /* "PyCafe.pyx":2852 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * #for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 2852, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvInt8 = __pyx_t_20; + __pyx_t_20.memview = NULL; + __pyx_t_20.data = NULL; + + /* "PyCafe.pyx":2856 + * #for ij in range(0, nelemMethod): + * # mvInt8[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return mvInt8 #np.array(mvInt8) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2857 + * # mvInt8[ij] = ui8val[ij] + * free(ui8val) + * return mvInt8 #np.array(mvInt8) # <<<<<<<<<<<<<< + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int8_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2851 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + */ + goto __pyx_L77; + } + + /* "PyCafe.pyx":2859 + * return mvInt8 #np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * #https://stackoverflow.com/questions/21851985/difference-between-np-int-np-int-int-and-np-int-t-in-cython + * #https://stackoverflow.com/questions/25102409/c-malloc-array-pointer-return-in-cython + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2859, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L90_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2859, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L90_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2859, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L90_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2865 + * #Alterantive copy methods are not faster than the for loop! 0.05 seconds added to ca read time of 0.14s 1.4 million elements + * #''' + * mvUInt8n = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8) # order='C') + * ##start = time.time() + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2866 + * #''' + * mvUInt8n = np.empty( + * nelemMethod, dtype=np.uint8) # order='C') # <<<<<<<<<<<<<< + * ##start = time.time() + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2865 + * #Alterantive copy methods are not faster than the for loop! 0.05 seconds added to ca read time of 0.14s 1.4 million elements + * #''' + * mvUInt8n = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8) # order='C') + * ##start = time.time() + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2866 + * #''' + * mvUInt8n = np.empty( + * nelemMethod, dtype=np.uint8) # order='C') # <<<<<<<<<<<<<< + * ##start = time.time() + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 2866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2865 + * #Alterantive copy methods are not faster than the for loop! 0.05 seconds added to ca read time of 0.14s 1.4 million elements + * #''' + * mvUInt8n = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8) # order='C') + * ##start = time.time() + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvUInt8n = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2868 + * nelemMethod, dtype=np.uint8) # order='C') + * ##start = time.time() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt8n[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2869 + * ##start = time.time() + * for ij in range(0, nelemMethod): + * mvUInt8n[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * ##print("Conversion time", time.time()-start) + */ + __pyx_t_4 = __Pyx_PyInt_From_npy_uint8(((__pyx_t_5numpy_uint8_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvUInt8n, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2869, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2870 + * for ij in range(0, nelemMethod): + * mvUInt8n[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * ##print("Conversion time", time.time()-start) + * return mvUInt8n ##np.array(ui8val) #mvUInt8n #ui8val #np.array(mvUInt8) + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2872 + * free(ui8val) + * ##print("Conversion time", time.time()-start) + * return mvUInt8n ##np.array(ui8val) #mvUInt8n #ui8val #np.array(mvUInt8) # <<<<<<<<<<<<<< + * #''' + * #cvarr = ui8val + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvUInt8n); + __pyx_r = __pyx_v_mvUInt8n; + goto __pyx_L0; + + /* "PyCafe.pyx":2859 + * return mvInt8 #np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * #https://stackoverflow.com/questions/21851985/difference-between-np-int-np-int-int-and-np-int-t-in-cython + * #https://stackoverflow.com/questions/25102409/c-malloc-array-pointer-return-in-cython + */ + goto __pyx_L77; + } + + /* "PyCafe.pyx":2885 + * + * else: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2886 + * else: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2885 + * + * else: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2886 + * else: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 2886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2886, __pyx_L1_error) + + /* "PyCafe.pyx":2885 + * + * else: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 2885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvUInt8 = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":2888 + * nelemMethod, dtype=np.uint8, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt8[ij] = ui8val[ij] + * # mvShortNP=cnp.asarray(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2889 + * #mvShortNP = np.ndarray(buffer=np.array(ui8val), dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * # mvShortNP=cnp.asarray(ui8val) + * + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvUInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2889, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint8_t *) __pyx_v_mvUInt8.data) + __pyx_t_22)) )) = ((__pyx_t_5numpy_uint8_t)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2893 + * + * # aaa=np.full(nelemMethod, ui8val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 2897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":2898 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2899 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return memoryview(mvShort) + */ + __pyx_t_23 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2899, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_23)) )) = ((short)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2900 + * for ij in range(0, nelemMethod): + * mvShort[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return memoryview(mvShort) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2901 + * mvShort[ij] = ui8val[ij] + * free(ui8val) + * return memoryview(mvShort) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2896 + * return np.array(mvUInt8) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L71; + } + + /* "PyCafe.pyx":2903 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2903, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L102_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2903, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L102_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2904 + * + * elif art in ['array', 'array.array']: + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < short > ui8val[ij]) + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_a = ((arrayobject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2905 + * elif art in ['array', 'array.array']: + * a = array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append( < short > ui8val[ij]) + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2906 + * a = array.array('h') + * for ij in range(0, nelemMethod): + * a.append( < short > ui8val[ij]) # <<<<<<<<<<<<<< + * free(ui8val) + * return a + */ + __pyx_t_4 = __Pyx_PyInt_From_short(((short)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_4); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 2906, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2907 + * for ij in range(0, nelemMethod): + * a.append( < short > ui8val[ij]) + * free(ui8val) # <<<<<<<<<<<<<< + * return a + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2908 + * a.append( < short > ui8val[ij]) + * free(ui8val) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":2903 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L71; + } + + /* "PyCafe.pyx":2910 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2910, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L106_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2910, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L106_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2911 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = ui8val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray16 = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2912 + * elif art in ['ctypes', 'ctype']: + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray16[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2913 + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return ctypesArray16 + */ + __pyx_t_4 = __Pyx_PyInt_From_short(((short)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray16, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 2913, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":2914 + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return ctypesArray16 + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2915 + * ctypesArray16[ij] = ui8val[ij] + * free(ui8val) + * return ctypesArray16 # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray16); + __pyx_r = __pyx_v_ctypesArray16; + goto __pyx_L0; + + /* "PyCafe.pyx":2910 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L71; + } + + /* "PyCafe.pyx":2918 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":2919 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":2918 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2920 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2921 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2922 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = ui8val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2922, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 2922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvUInt8 = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":2923 + * print("Returning memoryview") + * mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2924 + * mvUInt8 = np.empty(nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return mvUInt8 + */ + __pyx_t_24 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_24 >= (size_t)__pyx_v_mvUInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2924, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint8_t *) __pyx_v_mvUInt8.data) + __pyx_t_24)) )) = ((dbr_char_t)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2925 + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return mvUInt8 + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":2926 + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) + * return mvUInt8 # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvUInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint8_t, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L71:; + + /* "PyCafe.pyx":2838 + * + * #nelemMethod = min(len(ui8val), nelemMemory) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":2820 + * return mvStr + * + * elif dtcheck in [CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":2930 + * elif dtcheck in [CAFE_SHORT]: + * + * i16val = malloc(nelemMemory * sizeof(np.int16)) # <<<<<<<<<<<<<< + * # start=time.time() + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_i16val = ((short *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2932 + * i16val = malloc(nelemMemory * sizeof(np.int16)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, i16val) + * # end=time.time() + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":2933 + * # start=time.time() + * with nogil: + * status = self._c_cafe.getShortArray(handle, i16val) # <<<<<<<<<<<<<< + * # end=time.time() + * #print ("END TIME SHORT", end - start) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getShortArray(__pyx_v_handle, __pyx_v_i16val); + } + + /* "PyCafe.pyx":2932 + * i16val = malloc(nelemMemory * sizeof(np.int16)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getShortArray(handle, i16val) + * # end=time.time() + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L114; + } + __pyx_L114:; + } + } + + /* "PyCafe.pyx":2936 + * # end=time.time() + * #print ("END TIME SHORT", end - start) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2939 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # ##mvInt=ival + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L117_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L117_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L117_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L117_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2939, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L117_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2945 + * # ##set_base(arr, ival) + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L123_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L123_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L123_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L123_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2946 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":2947 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":2946 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2947 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 2947, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2947, __pyx_L1_error) + + /* "PyCafe.pyx":2946 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 2946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":2948 + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2949 + * nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvShort) + */ + __pyx_t_25 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_25 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2949, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_25)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2950 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvShort) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2951 + * mvShort[ij] = i16val[ij] + * free(i16val) + * return np.array(mvShort) # <<<<<<<<<<<<<< + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_10 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2945 + * # ##set_base(arr, ival) + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') + */ + goto __pyx_L122; + } + + /* "PyCafe.pyx":2953 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L129_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L129_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L129_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L129_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L129_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L129_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":2954 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":2955 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] + */ + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + + /* "PyCafe.pyx":2954 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":2955 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 2955, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2955, __pyx_L1_error) + + /* "PyCafe.pyx":2954 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 2954, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvInt8 = __pyx_t_20; + __pyx_t_20.memview = NULL; + __pyx_t_20.data = NULL; + + /* "PyCafe.pyx":2956 + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2957 + * nelemMethod, dtype=np.int8, order='C') + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvInt8) + */ + __pyx_t_26 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_26 >= (size_t)__pyx_v_mvInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2957, __pyx_L1_error) + } + *((__pyx_t_5numpy_int8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int8_t *) __pyx_v_mvInt8.data) + __pyx_t_26)) )) = ((__pyx_t_5numpy_int8_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2958 + * for ij in range(0, nelemMethod): + * mvInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2959 + * mvInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvInt8) # <<<<<<<<<<<<<< + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int8_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2953 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemMethod, dtype=np.int8, order='C') + */ + goto __pyx_L122; + } + + /* "PyCafe.pyx":2961 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2961, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L137_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2961, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L137_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2961, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L137_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2962 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2963 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":2962 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2963 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 2963, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2963, __pyx_L1_error) + + /* "PyCafe.pyx":2962 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 2962, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvUInt8 = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":2964 + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2965 + * nelemMethod, dtype=np.uint8, order='C') + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvUInt8) + */ + __pyx_t_27 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_27 >= (size_t)__pyx_v_mvUInt8.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2965, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint8_t *) __pyx_v_mvUInt8.data) + __pyx_t_27)) )) = ((__pyx_t_5numpy_uint8_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2966 + * for ij in range(0, nelemMethod): + * mvUInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvUInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2967 + * mvUInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvUInt8) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvUInt8, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint8_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2961 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemMethod, dtype=np.uint8, order='C') + */ + goto __pyx_L122; + } + + /* "PyCafe.pyx":2971 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2972 + * + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":2971 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2972 + * + * mvShort = np.empty( + * nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 2972, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2972, __pyx_L1_error) + + /* "PyCafe.pyx":2971 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 2971, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":2974 + * nelemMethod, dtype=np.int16, order='C') + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * # mvShortNP=cnp.asarray(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2975 + * #mvShortNP = np.ndarray(buffer=np.array(i16val), dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * # mvShortNP=cnp.asarray(i16val) + * + */ + __pyx_t_28 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_28 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2975, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_28)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2979 + * + * # aaa=np.full(nelemMethod,ival + */ + goto __pyx_L116; + } + + /* "PyCafe.pyx":2983 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L144_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L144_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L144_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2984 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 2984, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 2984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":2985 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2986 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_29 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_29 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 2986, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_29)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":2987 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return memoryview(mvShort) + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2989 + * free(i16val) + * + * return memoryview(mvShort) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2983 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L116; + } + + /* "PyCafe.pyx":2991 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('h') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2991, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L149_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2991, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L149_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":2993 + * elif art in ['array', 'array.array']: + * + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_a = ((arrayobject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2994 + * + * a = array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append( < short > i16val[ij]) + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":2995 + * a = array.array('h') + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) # <<<<<<<<<<<<<< + * free(i16val) + * return a + */ + __pyx_t_3 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_3); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 2995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":2996 + * for ij in range(0, nelemMethod): + * a.append( < short > i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return a + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":2997 + * a.append( < short > i16val[ij]) + * free(i16val) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":2991 + * return memoryview(mvShort) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('h') + */ + goto __pyx_L116; + } + + /* "PyCafe.pyx":2999 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2999, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L153_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2999, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L153_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3001 + * elif art in ['ctypes', 'ctype']: + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyNumber_Multiply(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3001, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_ctypesArray16 = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3002 + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray16[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3003 + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return ctypesArray16 + */ + __pyx_t_3 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray16, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 3003, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":3004 + * for ij in range(0, nelemMethod): + * ctypesArray16[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray16 + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3005 + * ctypesArray16[ij] = i16val[ij] + * free(i16val) + * return ctypesArray16 # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray16); + __pyx_r = __pyx_v_ctypesArray16; + goto __pyx_L0; + + /* "PyCafe.pyx":2999 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * + * ctypesArray16 = (ctypes.c_int16*nelemMethod)() + */ + goto __pyx_L116; + } + + /* "PyCafe.pyx":3008 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":3009 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":3008 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3010 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3011 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3012 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3012, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 3012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":3013 + * print("Returning memoryview") + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3014 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_30 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_30 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3014, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_30)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3015 + * for ij in range(0, nelemMethod): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3017 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L116:; + + /* "PyCafe.pyx":2936 + * # end=time.time() + * #print ("END TIME SHORT", end - start) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":2928 + * return mvUInt8 + * + * elif dtcheck in [CAFE_SHORT]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemMemory * sizeof(np.int16)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3021 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc(nelemMemory * sizeof(np.int32)) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.getLongArray(handle, ival) + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_ival = ((int *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_4))))); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3022 + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, ival) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3023 + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: + * status = self._c_cafe.getLongArray(handle, ival) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getLongArray(__pyx_v_handle, __pyx_v_ival); + } + + /* "PyCafe.pyx":3022 + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getLongArray(handle, ival) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L161; + } + __pyx_L161:; + } + } + + /* "PyCafe.pyx":3025 + * status = self._c_cafe.getLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3030 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L164_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L164_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L164_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L164_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3030, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L164_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3034 + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + * + * if dt in ['np.int32', 'int32']: # <<<<<<<<<<<<<< + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_int32, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3034, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L170_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_int32, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3034, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L170_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3035 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3036 + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":3035 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3036 + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + */ + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3036, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 3036, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3036, __pyx_L1_error) + + /* "PyCafe.pyx":3035 + * + * if dt in ['np.int32', 'int32']: + * mvInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 3035, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvInt32 = __pyx_t_31; + __pyx_t_31.memview = NULL; + __pyx_t_31.data = NULL; + + /* "PyCafe.pyx":3037 + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt32[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3038 + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvInt32) + */ + __pyx_t_32 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_32 >= (size_t)__pyx_v_mvInt32.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3038, __pyx_L1_error) + } + *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int32_t *) __pyx_v_mvInt32.data) + __pyx_t_32)) )) = ((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3039 + * for ij in range(0, nelemMethod): + * mvInt32[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3040 + * mvInt32[ij] = ival[ij] + * free(ival) + * return np.array(mvInt32) # <<<<<<<<<<<<<< + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvInt32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int32_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3034 + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + * + * if dt in ['np.int32', 'int32']: # <<<<<<<<<<<<<< + * mvInt32 = np.empty( + * nelemMethod, dtype=np.int32, order='C') + */ + goto __pyx_L169; + } + + /* "PyCafe.pyx":3041 + * free(ival) + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: # <<<<<<<<<<<<<< + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_6 = __pyx_v_dt; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_uint32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3041, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L174_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_uint32, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3041, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L174_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3042 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3043 + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":3042 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3043 + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_uint32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3043, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3043, __pyx_L1_error) + + /* "PyCafe.pyx":3042 + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: + * mvUInt32 = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_33 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_33.memview)) __PYX_ERR(0, 3042, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvUInt32 = __pyx_t_33; + __pyx_t_33.memview = NULL; + __pyx_t_33.data = NULL; + + /* "PyCafe.pyx":3044 + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvUInt32[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3045 + * nelemMethod, dtype=np.uint32, order='C') + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvUInt32) + */ + __pyx_t_34 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_34 >= (size_t)__pyx_v_mvUInt32.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3045, __pyx_L1_error) + } + *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_mvUInt32.data) + __pyx_t_34)) )) = ((__pyx_t_5numpy_uint32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3046 + * for ij in range(0, nelemMethod): + * mvUInt32[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvUInt32) + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3047 + * mvUInt32[ij] = ival[ij] + * free(ival) + * return np.array(mvUInt32) # <<<<<<<<<<<<<< + * + * # elif dt in ['np.int64','int64']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvUInt32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3041 + * free(ival) + * return np.array(mvInt32) + * elif dt in ['np.uint32', 'uint32']: # <<<<<<<<<<<<<< + * mvUInt32 = np.empty( + * nelemMethod, dtype=np.uint32, order='C') + */ + goto __pyx_L169; + } + + /* "PyCafe.pyx":3063 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3064 + * else: + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":3063 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3064 + * else: + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3064, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3064, __pyx_L1_error) + + /* "PyCafe.pyx":3063 + * + * else: + * mvInt = np.empty( # <<<<<<<<<<<<<< + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_35 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_35.memview)) __PYX_ERR(0, 3063, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvInt = __pyx_t_35; + __pyx_t_35.memview = NULL; + __pyx_t_35.data = NULL; + + /* "PyCafe.pyx":3065 + * mvInt = np.empty( + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3066 + * nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return np.array(mvInt) # arr + */ + __pyx_t_36 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_36 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3066, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_36)) )) = ((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3067 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return np.array(mvInt) # arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3068 + * mvInt[ij] = ival[ij] + * free(ival) + * return np.array(mvInt) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_10 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L169:; + + /* "PyCafe.pyx":3030 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.intc','np.int_','np.long','np.ulong','np.ushort','np.int32','np.int64','np.uint32','np.uint64']: + */ + goto __pyx_L163; + } + + /* "PyCafe.pyx":3070 + * return np.array(mvInt) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3070, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L180_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3070, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L180_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3070, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L180_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3071 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3071, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_35 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_35.memview)) __PYX_ERR(0, 3071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvInt = __pyx_t_35; + __pyx_t_35.memview = NULL; + __pyx_t_35.data = NULL; + + /* "PyCafe.pyx":3072 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3073 + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return memoryview(mvInt) + */ + __pyx_t_37 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_37 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3073, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_37)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3074 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return memoryview(mvInt) + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3075 + * mvInt[ij] = ival[ij] + * free(ival) + * return memoryview(mvInt) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3070 + * return np.array(mvInt) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L163; + } + + /* "PyCafe.pyx":3077 + * return memoryview(mvInt) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L185_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + __pyx_t_5 = __pyx_t_7; + __pyx_L185_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3078 + * + * elif art in ['array', 'array.array']: + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_a = ((arrayobject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3079 + * elif art in ['array', 'array.array']: + * a = array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append( < int > ival[ij]) + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3080 + * a = array.array('h') + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) # <<<<<<<<<<<<<< + * free(ival) + * return a + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_3); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 3080, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":3081 + * for ij in range(0, nelemMethod): + * a.append( < int > ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return a + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3082 + * a.append( < int > ival[ij]) + * free(ival) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":3077 + * return memoryview(mvInt) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('h') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L163; + } + + /* "PyCafe.pyx":3084 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3084, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L189_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3084, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L189_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3085 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3086 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3087 + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return ctypesArray + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_3, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 3087, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafe.pyx":3088 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3089 + * ctypesArray[ij] = ival[ij] + * free(ival) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":3084 + * return a + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L163; + } + + /* "PyCafe.pyx":3092 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":3093 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":3092 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3094 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3095 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3096 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 3096, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_35 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_35.memview)) __PYX_ERR(0, 3096, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvInt = __pyx_t_35; + __pyx_t_35.memview = NULL; + __pyx_t_35.data = NULL; + + /* "PyCafe.pyx":3097 + * print("Returning memoryview") + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3098 + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_38 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_38 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3098, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_38)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3099 + * for ij in range(0, nelemMethod): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3100 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + __pyx_L163:; + + /* "PyCafe.pyx":3025 + * status = self._c_cafe.getLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":3019 + * return mvShort + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc(nelemMemory * sizeof(np.int32)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3104 + * elif dtcheck in [CAFE_FLOAT]: + * + * fval = malloc(nelemMemory * sizeof(float)) # <<<<<<<<<<<<<< + * # start=time.time() + * with nogil: + */ + __pyx_v_fval = ((float *)malloc((__pyx_v_nelemMemory * (sizeof(float))))); + + /* "PyCafe.pyx":3106 + * fval = malloc(nelemMemory * sizeof(float)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, fval) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3107 + * # start=time.time() + * with nogil: + * status = self._c_cafe.getFloatArray(handle, fval) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getFloatArray(__pyx_v_handle, __pyx_v_fval); + } + + /* "PyCafe.pyx":3106 + * fval = malloc(nelemMemory * sizeof(float)) + * # start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getFloatArray(handle, fval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L197; + } + __pyx_L197:; + } + } + + /* "PyCafe.pyx":3114 + * # status=self._c_cafe.get(handle, pvd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_5 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3117 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.float16','np.float32']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L200_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L200_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L200_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L200_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L200_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3121 + * # elif dt in ['np.float16','np.float32']: + * + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_39 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_39.memview)) __PYX_ERR(0, 3121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mvFloat = __pyx_t_39; + __pyx_t_39.memview = NULL; + __pyx_t_39.data = NULL; + + /* "PyCafe.pyx":3122 + * + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) + * # arr=np.asarray(mvFloat) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3123 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * # arr=np.asarray(mvFloat) + * + */ + __pyx_t_40 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_40 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3123, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_40)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3126 + * # arr=np.asarray(mvFloat) + * + * free(fval) # <<<<<<<<<<<<<< + * + * #arr = np.ascontiguousarray(mvDouble) + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3131 + * #set_base(arr, dval) + * + * return np.array(mvFloat) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3117 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['np.float16','np.float32']: + */ + goto __pyx_L199; + } + + /* "PyCafe.pyx":3133 + * return np.array(mvFloat) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L207_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L207_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L207_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3136 + * + * # Method A to return memory view + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_39 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_39.memview)) __PYX_ERR(0, 3136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvFloat = __pyx_t_39; + __pyx_t_39.memview = NULL; + __pyx_t_39.data = NULL; + + /* "PyCafe.pyx":3137 + * # Method A to return memory view + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3138 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_41 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_41 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3138, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_41)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3140 + * mvFloat[ij] = fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * # memoryview(mvFloat).tolist() #tolist() only supports byte views + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3143 + * # memoryview(mvFloat).tolist() #tolist() only supports byte views + * + * return memoryview(mvFloat) # <<<<<<<<<<<<<< + * + * # Method B to return memory view + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3133 + * return np.array(mvFloat) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L199; + } + + /* "PyCafe.pyx":3157 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('f') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3157, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L212_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3157, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + __pyx_t_7 = __pyx_t_2; + __pyx_L212_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_7 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3159 + * elif art in ['array', 'array.array']: + * + * a = array.array('f') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_a = ((arrayobject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3161 + * a = array.array('f') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append(fval[ij]) + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3162 + * + * for ij in range(0, nelemMethod): + * a.append(fval[ij]) # <<<<<<<<<<<<<< + * free(fval) + * + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_4); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 3162, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":3163 + * for ij in range(0, nelemMethod): + * a.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * + * return a + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3165 + * free(fval) + * + * return a # <<<<<<<<<<<<<< + * ''' + * arrayArray=array.array('f') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":3157 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * + * a = array.array('f') + */ + goto __pyx_L199; + } + + /* "PyCafe.pyx":3185 + * ''' + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3185, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_2 = __pyx_t_5; + goto __pyx_L216_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3185, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L216_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3186 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_float*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_float); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyNumber_Multiply(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_ctypesArray = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3187 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = fval[ij] + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3188 + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return ctypesArray + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_4, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 3188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":3189 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3190 + * ctypesArray[ij] = fval[ij] + * free(fval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":3185 + * ''' + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L199; + } + + /* "PyCafe.pyx":3193 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":3194 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":3193 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":3195 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":3196 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":3197 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_39 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_39.memview)) __PYX_ERR(0, 3197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvFloat = __pyx_t_39; + __pyx_t_39.memview = NULL; + __pyx_t_39.data = NULL; + + /* "PyCafe.pyx":3198 + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * free(fval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3199 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return mvFloat + */ + __pyx_t_42 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_42 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3199, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_42)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3200 + * for ij in range(0, nelemMethod): + * mvFloat[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3201 + * mvFloat[ij] = fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L199:; + + /* "PyCafe.pyx":3114 + * # status=self._c_cafe.get(handle, pvd) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":3102 + * return mvInt + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc(nelemMemory * sizeof(float)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3206 + * + * # start=time.time() + * dval = malloc(nelemMemory * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_dval = ((double *)malloc((__pyx_v_nelemMemory * (sizeof(double))))); + + /* "PyCafe.pyx":3208 + * dval = malloc(nelemMemory * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3210 + * with nogil: + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_dval); + } + + /* "PyCafe.pyx":3208 + * dval = malloc(nelemMemory * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * # for ij in range(0, 10000): + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L224; + } + __pyx_L224:; + } + } + + /* "PyCafe.pyx":3212 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_7 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":3215 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['double', 'np.float_','np.float64']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L227_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L227_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + if (!__pyx_t_5) { + } else { + __pyx_t_7 = __pyx_t_5; + goto __pyx_L227_bool_binop_done; + } + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_7 = __pyx_t_2; + goto __pyx_L227_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_2 != 0); + __pyx_t_7 = __pyx_t_5; + __pyx_L227_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3220 + * + * # mvDouble=dval + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_43 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_43.memview)) __PYX_ERR(0, 3220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_mvDouble = __pyx_t_43; + __pyx_t_43.memview = NULL; + __pyx_t_43.data = NULL; + + /* "PyCafe.pyx":3221 + * # mvDouble=dval + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * # arr=np.asarray(mvDouble) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3222 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * # arr=np.asarray(mvDouble) + * free(dval) + */ + __pyx_t_44 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_44 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3222, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_44)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3224 + * mvDouble[ij] = dval[ij] + * # arr=np.asarray(mvDouble) + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3227 + * # end=time.time() + * #print (end - start) + * return np.array(mvDouble) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3215 + * # nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * # elif dt in ['double', 'np.float_','np.float64']: + */ + goto __pyx_L226; + } + + /* "PyCafe.pyx":3229 + * return np.array(mvDouble) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3229, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_5 = __pyx_t_2; + goto __pyx_L234_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3229, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L234_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3229, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L234_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3232 + * + * # Method A to return memory view + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_43 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_43.memview)) __PYX_ERR(0, 3232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_mvDouble = __pyx_t_43; + __pyx_t_43.memview = NULL; + __pyx_t_43.data = NULL; + + /* "PyCafe.pyx":3233 + * # Method A to return memory view + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3234 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * # end=time.time() + */ + __pyx_t_45 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_45 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3234, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_45)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3235 + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3238 + * # end=time.time() + * #print (end - start) + * return memoryview(mvDouble) # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3229 + * return np.array(mvDouble) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L226; + } + + /* "PyCafe.pyx":3240 + * return memoryview(mvDouble) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('d') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3240, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_5 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L239_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3240, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_7 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L239_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__pyx_t_2 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":3241 + * + * elif art in ['array', 'array.array']: + * a = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_v_a = ((arrayobject *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3242 + * elif art in ['array', 'array.array']: + * a = array.array('d') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * a.append(dval[ij]) + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3243 + * a = array.array('d') + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) # <<<<<<<<<<<<<< + * free(dval) + * # end=time.time() + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_a), __pyx_t_9); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 3243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3244 + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * # end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3247 + * # end=time.time() + * #print (end - start) + * return a # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + __pyx_r = ((PyObject *)__pyx_v_a); + goto __pyx_L0; + + /* "PyCafe.pyx":3240 + * return memoryview(mvDouble) + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * a = array.array('d') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L226; + } + + /* "PyCafe.pyx":3249 + * return a + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_6 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3249, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_5 = __pyx_t_7; + goto __pyx_L243_bool_binop_done; + } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3249, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_5 = __pyx_t_2; + __pyx_L243_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_5 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3250 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_c_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_ctypesArray = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3251 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3252 + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return ctypesArray + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_9, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 3252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3253 + * for ij in range(0, nelemMethod): + * ctypesArray[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3254 + * ctypesArray[ij] = dval[ij] + * free(dval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":3249 + * return a + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L226; + } + + /* "PyCafe.pyx":3257 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":3258 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":3257 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3259 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3260 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3261 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_43 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_43.memview)) __PYX_ERR(0, 3261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_mvDouble = __pyx_t_43; + __pyx_t_43.memview = NULL; + __pyx_t_43.data = NULL; + + /* "PyCafe.pyx":3262 + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_1 = __pyx_v_nelemMethod; + __pyx_t_11 = __pyx_t_1; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":3263 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_46 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_46 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + __PYX_ERR(0, 3263, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_46)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3264 + * for ij in range(0, nelemMethod): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3265 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + } + __pyx_L226:; + + /* "PyCafe.pyx":3212 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":3203 + * return mvFloat + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * # start=time.time() + */ + break; + default: break; + } + + /* "PyCafe.pyx":3267 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3268 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3269 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3270 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3269 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L251; + } + + /* "PyCafe.pyx":3272 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L251:; + + /* "PyCafe.pyx":3268 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3273 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3275 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_8) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3276 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3277 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3278 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3279 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(0, 3275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":3274 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":3280 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 3280, __pyx_L1_error) + + /* "PyCafe.pyx":3273 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":3282 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_8, 0, Py_None); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3267 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2578 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_33, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_35, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_39, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_43, 1); + __Pyx_AddTraceback("PyCafe.CyCafe.getArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvShort, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvDouble, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvFloat, 1); + __Pyx_XDECREF((PyObject *)__pyx_v_a); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvUInt8, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt8, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvUInt32, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt32, 1); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XDECREF(__pyx_v_locallist); + __Pyx_XDECREF(__pyx_v_mvStr); + __Pyx_XDECREF(__pyx_v_arrayArray); + __Pyx_XDECREF(__pyx_v_ctypesArray); + __Pyx_XDECREF(__pyx_v_mvUInt8n); + __Pyx_XDECREF(__pyx_v_ctypesArray16); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3290 + * ############################################################################ + * + * def getPVInt(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'int') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVInt(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVInt(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_262getPVInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_262getPVInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVInt", 0); + + /* "PyCafe.pyx":3291 + * + * def getPVInt(self, handlePV): + * return self.getPV(handlePV, 'int') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3290 + * ############################################################################ + * + * def getPVInt(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'int') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3295 + * + * ############################################################################ + * def getPVFloat(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'float') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_264getPVFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_264getPVFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVFloat", 0); + + /* "PyCafe.pyx":3296 + * ############################################################################ + * def getPVFloat(self, handlePV): + * return self.getPV(handlePV, 'float') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3295 + * + * ############################################################################ + * def getPVFloat(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'float') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3300 + * + * ############################################################################ + * def getPVStr(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'str') + * ############################################################################ + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVStr(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVStr(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_266getPVStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_266getPVStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVStr", 0); + + /* "PyCafe.pyx":3301 + * ############################################################################ + * def getPVStr(self, handlePV): + * return self.getPV(handlePV, 'str') # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3300 + * + * ############################################################################ + * def getPVStr(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV, 'str') + * ############################################################################ + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3305 + * + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPV" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPV (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPV") < 0)) __PYX_ERR(0, 3305, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPV", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3305, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 3305, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_268getPV(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_268getPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + int __pyx_v_status; + PVDataHolder __pyx_v_pvd; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pvd_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PVDataHolder __pyx_t_10; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_11; + __Pyx_RefNannySetupContext("getPV", 0); + + /* "PyCafe.pyx":3306 + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): + * cdef str _METHOD = "getPV" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getPV); + __pyx_v__METHOD = __pyx_n_u_getPV; + + /* "PyCafe.pyx":3308 + * cdef str _METHOD = "getPV" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3310 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3311 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3311, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3310 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3312 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3313 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3313, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3312 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3315 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_4); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 3315, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":3319 + * + * cdef int status + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + try { + __pyx_t_10 = PVDataHolder(__pyx_v_self->hh.getNelemNative(__pyx_v_handle)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3319, __pyx_L1_error) + } + __pyx_v_pvd = __pyx_t_10; + + /* "PyCafe.pyx":3321 + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.get(handle, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3322 + * + * with nogil: + * status = self._c_cafe.get(handle, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->get(__pyx_v_handle, __pyx_v_pvd); + } + + /* "PyCafe.pyx":3321 + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.get(handle, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3324 + * status = self._c_cafe.get(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3325 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3326 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3327 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3326 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":3329 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":3325 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3330 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3332 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3333 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3334 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3335 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 3332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3331 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3336 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 3336, __pyx_L1_error) + + /* "PyCafe.pyx":3330 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":3338 + * raise _cafeException + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * pvd_valnone.value[0] = None + * return pvd_valnone + */ + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pvd_valnone = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3339 + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * pvd_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvd_valnone + * + */ + if (unlikely(__pyx_v_pvd_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 3339, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvd_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 3339, __pyx_L1_error) + + /* "PyCafe.pyx":3340 + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * pvd_valnone.value[0] = None + * return pvd_valnone # <<<<<<<<<<<<<< + * + * return PVDataHolderToStruct(pvd, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvd_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvd_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":3324 + * status = self._c_cafe.get(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":3342 + * return pvd_valnone + * + * return PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11.__pyx_n = 1; + __pyx_t_11.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3305 + * + * ############################################################################ + * def getPV(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPV" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getPV", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3350 + * ################################################################################## + * + * def getPVStrList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271getPVStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271getPVStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStrList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_270getPVStrList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_270getPVStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVStrList", 0); + + /* "PyCafe.pyx":3351 + * + * def getPVStrList(self, handleList): + * return self.getPVList(handleList, dt='str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 3351, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3350 + * ################################################################################## + * + * def getPVStrList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStrList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3355 + * + * ################################################################################## + * def getPVIntList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273getPVIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273getPVIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVIntList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_272getPVIntList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_272getPVIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVIntList", 0); + + /* "PyCafe.pyx":3356 + * ################################################################################## + * def getPVIntList(self, handleList): + * return self.getPVList(handleList, dt='int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 3356, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3355 + * + * ################################################################################## + * def getPVIntList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVIntList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3360 + * + * ################################################################################## + * def getPVFloatList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloatList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_274getPVFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVFloatList", 0); + + /* "PyCafe.pyx":3361 + * ################################################################################## + * def getPVFloatList(self, handleList): + * return self.getPVList(handleList, dt='float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3360 + * + * ################################################################################## + * def getPVFloatList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloatList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3365 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVList" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVList") < 0)) __PYX_ERR(0, 3365, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVList", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3365, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 3365, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_276getPVList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_276getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_hl = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + CAFEDataTypeCode __pyx_v_cdt; + PyObject *__pyx_v_pvdList = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + PyObject *__pyx_v_bytesVal = 0; + PyObject *__pyx_v_localList = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_v_ll = NULL; + PyObject *__pyx_v_ld = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + unsigned int __pyx_t_19; + long __pyx_t_20; + unsigned int __pyx_t_21; + __Pyx_RefNannySetupContext("getPVList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3366 + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): + * cdef str _METHOD = "getPVList" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getPVList); + __pyx_v__METHOD = __pyx_n_u_getPVList; + + /* "PyCafe.pyx":3368 + * cdef str _METHOD = "getPVList" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3369 + * + * if isinstance(handleList, (str, int, long)): + * hl = [] # <<<<<<<<<<<<<< + * hl.append(handleList) + * handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_hl = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3370 + * if isinstance(handleList, (str, int, long)): + * hl = [] + * hl.append(handleList) # <<<<<<<<<<<<<< + * handleList = [] + * handleList = hl + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_hl, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3370, __pyx_L1_error) + + /* "PyCafe.pyx":3371 + * hl = [] + * hl.append(handleList) + * handleList = [] # <<<<<<<<<<<<<< + * handleList = hl + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3372 + * hl.append(handleList) + * handleList = [] + * handleList = hl # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_hl); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_hl); + + /* "PyCafe.pyx":3368 + * cdef str _METHOD = "getPVList" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * hl = [] + * hl.append(handleList) + */ + } + + /* "PyCafe.pyx":3374 + * handleList = hl + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3375 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3374 + * handleList = hl + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3376 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3377 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3378 + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type \ + * if handles, else if PVs")) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3377 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type \ + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 3377, __pyx_L1_error) + + /* "PyCafe.pyx":3376 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format( + * self._exception_text, _METHOD, + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3396 + * # do this to avoid compiler warning messages + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3396, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3397 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3397, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3399 + * v.push_back(handleList[i]) + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * for i in range(0, v.size()): # len(handleList)): # + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":3401 + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + * + * for i in range(0, v.size()): # len(handleList)): # # <<<<<<<<<<<<<< + * pvd[i].setNelem(self.hh.getNelemNative(v[i])) # handleList[i])) + * # print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3402 + * + * for i in range(0, v.size()): # len(handleList)): # + * pvd[i].setNelem(self.hh.getNelemNative(v[i])) # handleList[i])) # <<<<<<<<<<<<<< + * # print " ", pvd[i].getNelem(), self.hh.getNelemNative(handleList[i]), i + * + */ + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemNative((__pyx_v_v[__pyx_v_i])))); + } + + /* "PyCafe.pyx":3407 + * cdef int status + * + * if cacheFlag: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + */ + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_cacheFlag); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3407, __pyx_L1_error) + if (__pyx_t_3) { + + /* "PyCafe.pyx":3408 + * + * if cacheFlag: + * status = self._c_cafe.getCachePVArray(v, pvd) # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCachePVArray(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":3407 + * cdef int status + * + * if cacheFlag: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":3410 + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getPVArray(v, pvd) + * + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3411 + * else: + * with nogil: + * status = self._c_cafe.getPVArray(v, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getPVArray(__pyx_v_v, __pyx_v_pvd); + } + + /* "PyCafe.pyx":3410 + * status = self._c_cafe.getCachePVArray(v, pvd) + * else: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + } + __pyx_L14:; + + /* "PyCafe.pyx":3413 + * status = self._c_cafe.getPVArray(v, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3414 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3415 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3416 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3417 + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3418 + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":3419 + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":3418 + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4); + __pyx_t_6 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3420 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3421 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3422 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(status) + * print("") # <<<<<<<<<<<<<< + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVList. Status = %d" %status) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3417 + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + } + + /* "PyCafe.pyx":3414 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, v.size()): #len(handleList)): + */ + } + + /* "PyCafe.pyx":3413 + * status = self._c_cafe.getPVArray(v, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3430 + * cdef CAFEDataTypeCode cdt + * + * pvdList = [] # <<<<<<<<<<<<<< + * cdef pvdata p1 + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_pvdList = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3435 + * cdef bytes bytesVal + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_8 = ((int)__pyx_v_v.size()); + __pyx_t_14 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_14; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3436 + * + * for i in range(0, v.size()): #len(handleList)): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":3438 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * localList = [] + * + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3438, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_dtcheck = __pyx_t_13; + + /* "PyCafe.pyx":3439 + * + * dtcheck = getMatchedDataType(dt, dtn) + * localList = [] # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_localList, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3441 + * localList = [] + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3442 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3443 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_9 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3444 + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":3445 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3446 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":3447 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3447, __pyx_L27_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3447, __pyx_L27_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3448 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3446 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L34_try_end; + __pyx_L27_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3449 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L28_exception_handled; + } + goto __pyx_L29_except_error; + __pyx_L29_except_error:; + + /* "PyCafe.pyx":3446 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L28_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L34_try_end:; + } + + /* "PyCafe.pyx":3445 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":3451 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3452 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":3453 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3453, __pyx_L36_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3453, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3454 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3452 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L43_try_end; + __pyx_L36_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3455 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L37_exception_handled; + } + goto __pyx_L38_except_error; + __pyx_L38_except_error:; + + /* "PyCafe.pyx":3452 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L37_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L43_try_end:; + } + + /* "PyCafe.pyx":3451 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":3457 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3458 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":3459 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3459, __pyx_L45_error) + } + __pyx_t_4 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3459, __pyx_L45_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3460 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3458 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L52_try_end; + __pyx_L45_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3461 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L46_exception_handled; + } + goto __pyx_L47_except_error; + __pyx_L47_except_error:; + + /* "PyCafe.pyx":3458 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L46_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L52_try_end:; + } + + /* "PyCafe.pyx":3457 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":3463 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3464 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3463 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":3466 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_SHORT: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 3466, __pyx_L1_error) } + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3466, __pyx_L1_error) + + /* "PyCafe.pyx":3442 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3469 + * + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3469, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3468 + * localList.append(strVal) + * + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3471 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3471, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3470 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3474 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3474, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_t_13) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3475 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_4 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3474 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L54; + } + + /* "PyCafe.pyx":3477 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_CHAR: + * # ( pvd[i].getAsChar()) + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L54:; + + /* "PyCafe.pyx":3472 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3480 + * elif dtcheck == CAFE_CHAR: + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3478 + * else: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3482 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3482, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3481 + * # ( pvd[i].getAsChar()) + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3484 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) # no data + */ + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3483 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":3486 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # no data # <<<<<<<<<<<<<< + * + * else: + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3486, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":3441 + * localList = [] + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + */ + goto __pyx_L25; + } + + /* "PyCafe.pyx":3489 + * + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3490 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3491 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString(j) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3493 + * for j in range(0, pvd[i].getNelem()): + * + * bytesVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3494 + * + * bytesVal = pvd[i].getAsString(j) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":3495 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_9 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3495, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3496 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":3497 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3497, __pyx_L58_error) + } + __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3497, __pyx_L58_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3498 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3496 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L65_try_end; + __pyx_L58_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3499 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L59_exception_handled; + } + goto __pyx_L60_except_error; + __pyx_L60_except_error:; + + /* "PyCafe.pyx":3496 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L59_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L65_try_end:; + } + + /* "PyCafe.pyx":3495 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":3501 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3502 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":3503 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3503, __pyx_L67_error) + } + __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3503, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3504 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3502 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L74_try_end; + __pyx_L67_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3505 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L68_exception_handled; + } + goto __pyx_L69_except_error; + __pyx_L69_except_error:; + + /* "PyCafe.pyx":3502 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L68_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L74_try_end:; + } + + /* "PyCafe.pyx":3501 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":3507 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3508 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":3509 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3509, __pyx_L76_error) + } + __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3509, __pyx_L76_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3510 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3508 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L83_try_end; + __pyx_L76_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3511 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L77_exception_handled; + } + goto __pyx_L78_except_error; + __pyx_L78_except_error:; + + /* "PyCafe.pyx":3508 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L77_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L83_try_end:; + } + + /* "PyCafe.pyx":3507 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":3513 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * localListInner.append(strVal) #pvd[i].getAsString(j)) + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3514 + * pass + * if not encoding: + * strVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3513 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * localListInner.append(strVal) #pvd[i].getAsString(j)) + */ + } + + /* "PyCafe.pyx":3515 + * if not encoding: + * strVal = pvd[i].getAsString(j) + * localListInner.append(strVal) #pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 3515, __pyx_L1_error) } + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_v_strVal); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3515, __pyx_L1_error) + } + + /* "PyCafe.pyx":3490 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3517 + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3518 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3518, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3516 + * strVal = pvd[i].getAsString(j) + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3520 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3521 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3521, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3519 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":3523 + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3525 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_21 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_21 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_v_self->_c_cafe->isEnum(__pyx_t_21) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3526 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_9 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3526, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3525 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":3528 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3528, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L91:; + } + + /* "PyCafe.pyx":3522 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":3530 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3532 + * for j in range(0, pvd[i].getNelem()): + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3532, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3529 + * else: + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # ( pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":3534 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3535 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3533 + * # ( pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3537 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3538 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3538, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":3536 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":3540 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(0) # no data + * localList.append(localListInner) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_13; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":3541 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3541, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":3542 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * p1 = pvdata() + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3542, __pyx_L1_error) + } + __pyx_L25:; + + /* "PyCafe.pyx":3544 + * localList.append(localListInner) + * + * p1 = pvdata() # <<<<<<<<<<<<<< + * p1.value = localList + * p1.status = pvd[i].getStatus() + */ + __pyx_t_9 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3545 + * + * p1 = pvdata() + * p1.value = localList # <<<<<<<<<<<<<< + * p1.status = pvd[i].getStatus() + * p1.statusAsString = pvd[i].getStatusAsString() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = __pyx_v_localList; + + /* "PyCafe.pyx":3546 + * p1 = pvdata() + * p1.value = localList + * p1.status = pvd[i].getStatus() # <<<<<<<<<<<<<< + * p1.statusAsString = pvd[i].getStatusAsString() + * p1.nelem = pvd[i].getNelem() + */ + __pyx_v_p1->status = (__pyx_v_pvd[__pyx_v_i]).getStatus(); + + /* "PyCafe.pyx":3547 + * p1.value = localList + * p1.status = pvd[i].getStatus() + * p1.statusAsString = pvd[i].getStatusAsString() # <<<<<<<<<<<<<< + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getStatusAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->statusAsString); + __Pyx_DECREF(__pyx_v_p1->statusAsString); + __pyx_v_p1->statusAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3548 + * p1.status = pvd[i].getStatus() + * p1.statusAsString = pvd[i].getStatusAsString() + * p1.nelem = pvd[i].getNelem() # <<<<<<<<<<<<<< + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + */ + __pyx_v_p1->nelem = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + + /* "PyCafe.pyx":3549 + * p1.statusAsString = pvd[i].getStatusAsString() + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + */ + __pyx_v_p1->alarmStatus = (__pyx_v_pvd[__pyx_v_i]).getAlarmStatus(); + + /* "PyCafe.pyx":3550 + * p1.nelem = pvd[i].getNelem() + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() # <<<<<<<<<<<<<< + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + */ + __pyx_v_p1->alarmSeverity = (__pyx_v_pvd[__pyx_v_i]).getAlarmSeverity(); + + /* "PyCafe.pyx":3551 + * p1.alarmStatus = pvd[i].getAlarmStatus() + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() # <<<<<<<<<<<<<< + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAlarmStatusAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->alarmStatusAsString); + __Pyx_DECREF(__pyx_v_p1->alarmStatusAsString); + __pyx_v_p1->alarmStatusAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3552 + * p1.alarmSeverity = pvd[i].getAlarmSeverity() + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() # <<<<<<<<<<<<<< + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd[i].getDataType()) + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAlarmSeverityAsString()); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->alarmSeverityAsString); + __Pyx_DECREF(__pyx_v_p1->alarmSeverityAsString); + __pyx_v_p1->alarmSeverityAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3553 + * p1.alarmStatusAsString = pvd[i].getAlarmStatusAsString() + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() # <<<<<<<<<<<<<< + * p1.dataTypeAsString = cdt.message(pvd[i].getDataType()) + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + */ + __pyx_v_p1->dataType = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":3554 + * p1.alarmSeverityAsString = pvd[i].getAlarmSeverityAsString() + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd[i].getDataType()) # <<<<<<<<<<<<<< + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * + */ + __pyx_t_9 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cdt.message((__pyx_v_pvd[__pyx_v_i]).getDataType())); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_p1->dataTypeAsString); + __Pyx_DECREF(__pyx_v_p1->dataTypeAsString); + __pyx_v_p1->dataTypeAsString = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3555 + * p1.dataType = pvd[i].getDataType() + * p1.dataTypeAsString = cdt.message(pvd[i].getDataType()) + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * ll = [] + */ + __pyx_v_pvd->_etsNorm = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsUInt32(); + + /* "PyCafe.pyx":3557 + * pvd._etsNorm = pvd[i].getEpicsTimeStampAsUInt32() + * + * ll = [] # <<<<<<<<<<<<<< + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3558 + * + * ll = [] + * ll.append((pvd[i]._etsNorm).secPastEpoch) # <<<<<<<<<<<<<< + * ll.append((pvd[i]._etsNorm).nsec) + * p1.ts = ll + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int((__pyx_v_pvd[__pyx_v_i])._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3558, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3559 + * ll = [] + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) # <<<<<<<<<<<<<< + * p1.ts = ll + * + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int((__pyx_v_pvd[__pyx_v_i])._etsNorm.nsec); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3559, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3560 + * ll.append((pvd[i]._etsNorm).secPastEpoch) + * ll.append((pvd[i]._etsNorm).nsec) + * p1.ts = ll # <<<<<<<<<<<<<< + * + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() + */ + __Pyx_INCREF(__pyx_v_ll); + __Pyx_GIVEREF(__pyx_v_ll); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = __pyx_v_ll; + + /* "PyCafe.pyx":3562 + * p1.ts = ll + * + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * ld = [] + */ + __pyx_v_pvd->_etsDate = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsDate(); + + /* "PyCafe.pyx":3564 + * pvd._etsDate = pvd[i].getEpicsTimeStampAsDate() + * + * ld = [] # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ld, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3565 + * + * ld = [] + * ld.append((pvd[i]._etsDate).year) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.year); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3565, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3566 + * ld = [] + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.mon); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3566, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3567 + * ld.append((pvd[i]._etsDate).year) + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3567, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3568 + * ld.append((pvd[i]._etsDate).mon) + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3568, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3569 + * ld.append((pvd[i]._etsDate).day) + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3569, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3570 + * ld.append((pvd[i]._etsDate).hour) + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) # <<<<<<<<<<<<<< + * ld.append((pvd[i]._etsDate).nsec) + * p1.tsDate = ld + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i])._etsDate.sec); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3570, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3571 + * ld.append((pvd[i]._etsDate).min) + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) # <<<<<<<<<<<<<< + * p1.tsDate = ld + * + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_long((__pyx_v_pvd[__pyx_v_i])._etsDate.nsec); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_ld, __pyx_t_9); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3571, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3572 + * ld.append((pvd[i]._etsDate).sec) + * ld.append((pvd[i]._etsDate).nsec) + * p1.tsDate = ld # <<<<<<<<<<<<<< + * + * pvdList.append(p1) + */ + __Pyx_INCREF(__pyx_v_ld); + __Pyx_GIVEREF(__pyx_v_ld); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = __pyx_v_ld; + + /* "PyCafe.pyx":3574 + * p1.tsDate = ld + * + * pvdList.append(p1) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_pvdList, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3574, __pyx_L1_error) + } + + /* "PyCafe.pyx":3578 + * # free(pvd) + * + * return pvdList, status # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_v_pvdList); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3365 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native', cacheFlag=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVList" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_hl); + __Pyx_XDECREF(__pyx_v_pvdList); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3586 + * ################################################################################## + * + * def printStatusIfError(self, handleList, statusList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_statusList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("printStatusIfError (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_statusList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statusList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("printStatusIfError", 1, 2, 2, 1); __PYX_ERR(0, 3586, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printStatusIfError") < 0)) __PYX_ERR(0, 3586, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = values[0]; + __pyx_v_statusList = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("printStatusIfError", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3586, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.printStatusIfError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_statusList); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_278printStatusIfError(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_statusList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + PyObject *__pyx_v_statusListB = NULL; + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + std::vector __pyx_t_14; + __Pyx_RefNannySetupContext("printStatusIfError", 0); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_INCREF(__pyx_v_statusList); + + /* "PyCafe.pyx":3588 + * def printStatusIfError(self, handleList, statusList): + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_printStatusIfError); + __pyx_v__METHOD = __pyx_n_u_printStatusIfError; + + /* "PyCafe.pyx":3590 + * cdef str _METHOD = "printStatusIfError" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3591 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3592 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3592, __pyx_L1_error) + + /* "PyCafe.pyx":3593 + * handleListB = [] + * handleListB.append(handleList) + * handleList = [] # <<<<<<<<<<<<<< + * handleList = handleListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3594 + * handleListB.append(handleList) + * handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3590 + * cdef str _METHOD = "printStatusIfError" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3596 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3597 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3596 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3598 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3599 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_4); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 3599, __pyx_L1_error) + + /* "PyCafe.pyx":3598 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3602 + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + * if isinstance(statusList, (int, long)): # <<<<<<<<<<<<<< + * statusListB = [] + * statusListB.append(statusList) + */ + __pyx_t_1 = PyInt_Check(__pyx_v_statusList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_statusList); + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L11_bool_binop_done:; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3603 + * + * if isinstance(statusList, (int, long)): + * statusListB = [] # <<<<<<<<<<<<<< + * statusListB.append(statusList) + * statusList = [] + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusListB = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3604 + * if isinstance(statusList, (int, long)): + * statusListB = [] + * statusListB.append(statusList) # <<<<<<<<<<<<<< + * statusList = [] + * statusList = statusListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_statusListB, __pyx_v_statusList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3604, __pyx_L1_error) + + /* "PyCafe.pyx":3605 + * statusListB = [] + * statusListB.append(statusList) + * statusList = [] # <<<<<<<<<<<<<< + * statusList = statusListB + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3606 + * statusListB.append(statusList) + * statusList = [] + * statusList = statusListB # <<<<<<<<<<<<<< + * + * if not isinstance(statusList, (list)): + */ + __Pyx_INCREF(__pyx_v_statusListB); + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_v_statusListB); + + /* "PyCafe.pyx":3602 + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + * if isinstance(statusList, (int, long)): # <<<<<<<<<<<<<< + * statusListB = [] + * statusListB.append(statusList) + */ + } + + /* "PyCafe.pyx":3608 + * statusList = statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be of of type ")) + */ + __pyx_t_1 = PyList_Check(__pyx_v_statusList); + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3609 + * + * if not isinstance(statusList, (list)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Second input argument should be of of type ")) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_6); + } else + #endif + { + __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_should_be); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_should_be); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_kp_u_Second_input_argument_should_be); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 3609, __pyx_L1_error) + + /* "PyCafe.pyx":3608 + * statusList = statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be of of type ")) + */ + } + + /* "PyCafe.pyx":3612 + * "Second input argument should be of of type ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be a of of type ")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_statusList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_1 = PyFloat_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3613 + * + * if not isinstance(statusList[0], (int, long, float)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "Second input argument should be a of of type ")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be_2}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_Second_input_argument_should_be_2}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_Second_input_argument_should_be_2); + __Pyx_GIVEREF(__pyx_kp_u_Second_input_argument_should_be_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_Second_input_argument_should_be_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 3613, __pyx_L1_error) + + /* "PyCafe.pyx":3612 + * "Second input argument should be of of type ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "Second input argument should be a of of type ")) + */ + } + + /* "PyCafe.pyx":3619 + * # do next step to avoid: + * # warning: comparison between signed and unsigned integer expressions + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3619, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3621 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * self._c_cafe.printStatusIfError(v, statusList) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3621, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3621, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3623 + * v.push_back(handleList[i]) + * + * self._c_cafe.printStatusIfError(v, statusList) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_14 = __pyx_convert_vector_from_py_int(__pyx_v_statusList); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3623, __pyx_L1_error) + (void)(__pyx_v_self->_c_cafe->printStatusIfError(__pyx_v_v, __pyx_t_14)); + + /* "PyCafe.pyx":3624 + * + * self._c_cafe.printStatusIfError(v, statusList) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":3586 + * ################################################################################## + * + * def printStatusIfError(self, handleList, statusList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "printStatusIfError" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.printStatusIfError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_statusListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3629 + * + * ################################################################################## + * def getAsyn(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getAsyn" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getAsyn(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getAsyn(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getAsyn (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_280getAsyn(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_280getAsyn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + unsigned int __pyx_t_13; + __Pyx_RefNannySetupContext("getAsyn", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3631 + * def getAsyn(self, handleList): + * ################################################################################## + * cdef str _METHOD = "getAsyn" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_n_u_getAsyn); + __pyx_v__METHOD = __pyx_n_u_getAsyn; + + /* "PyCafe.pyx":3633 + * cdef str _METHOD = "getAsyn" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3634 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3635 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3635, __pyx_L1_error) + + /* "PyCafe.pyx":3637 + * handleListB.append(handleList) + * #handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if isinstance(handleList[0], (str)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3633 + * cdef str _METHOD = "getAsyn" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3639 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3640 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3639 + * handleList = handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":3641 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3642 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be a 'list' of of type if handles or if PVs")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_a_4}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_a_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_4); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 3642, __pyx_L1_error) + + /* "PyCafe.pyx":3641 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + * "First input argument should be a 'list' of of type if handles or if PVs")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":3647 + * cdef vector[unsigned int] v + * cdef vector[int] vStatus + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3647, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_10); + + /* "PyCafe.pyx":3648 + * cdef vector[int] vStatus + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * # do next step to avoid: + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3648, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_10); + + /* "PyCafe.pyx":3652 + * # do next step to avoid: + * # warning: comparison between signed and unsigned integer expressions + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3652, __pyx_L1_error) + __pyx_t_11 = __pyx_t_10; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":3654 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + try { + __pyx_v_v.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3654, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3658 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3659 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * if (status != ICAFE_NORMAL): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3658 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":3661 + * status = self._c_cafe.getV(v, vStatus) + * + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3662 + * + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3663 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3664 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3662 + * + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3661 + * status = self._c_cafe.getV(v, vStatus) + * + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") + */ + } + + /* "PyCafe.pyx":3666 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __pyx_t_6 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3629 + * + * ################################################################################## + * def getAsyn(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getAsyn" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getAsyn", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3674 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("waitForGetEvent (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_282waitForGetEvent(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("waitForGetEvent", 0); + + /* "PyCafe.pyx":3676 + * def waitForGetEvent(self, handlePV): + * + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3676, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":3677 + * + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForGetEvent(handle) + * return status + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3678 + * cdef unsigned int handle = handlePV + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_status = __pyx_v_self->_c_cafe->waitForGetEvent(__pyx_v_handle); + } + + /* "PyCafe.pyx":3677 + * + * cdef unsigned int handle = handlePV + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForGetEvent(handle) + * return status + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":3679 + * with nogil: + * status = self._c_cafe.waitForGetEvent(handle) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def waitForGetEvent(self, handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3674 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.waitForGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3685 + * + * ################################################################################## + * def waitForBundledEvents(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("waitForBundledEvents (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284waitForBundledEvents(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_handleListB = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vRB; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + unsigned int __pyx_t_11; + __Pyx_RefNannySetupContext("waitForBundledEvents", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3686 + * ################################################################################## + * def waitForBundledEvents(self, handleList): + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str, int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_waitForBundledEvents_self_handle); + __pyx_v__METHOD = __pyx_kp_u_waitForBundledEvents_self_handle; + + /* "PyCafe.pyx":3688 + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_v_handleList); + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3689 + * + * if isinstance(handleList, (str, int, long)): + * handleListB = [] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * #handleList = [] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3690 + * if isinstance(handleList, (str, int, long)): + * handleListB = [] + * handleListB.append(handleList) # <<<<<<<<<<<<<< + * #handleList = [] + * handleList = handleListB + */ + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_handleListB, __pyx_v_handleList); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3690, __pyx_L1_error) + + /* "PyCafe.pyx":3692 + * handleListB.append(handleList) + * #handleList = [] + * handleList = handleListB # <<<<<<<<<<<<<< + * + * if not isinstance(handleList, (list)): + */ + __Pyx_INCREF(__pyx_v_handleListB); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_v_handleListB); + + /* "PyCafe.pyx":3688 + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + * if isinstance(handleList, (str, int, long)): # <<<<<<<<<<<<<< + * handleListB = [] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":3694 + * handleList = handleListB + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_3 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3695 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 3695, __pyx_L1_error) + + /* "PyCafe.pyx":3694 + * handleList = handleListB + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":3698 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3699 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3698 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":3700 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3701 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 3701, __pyx_L1_error) + + /* "PyCafe.pyx":3700 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L8:; + + /* "PyCafe.pyx":3707 + * cdef vector[int] vRB + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vRB.reserve(len(handleList)) + * for i in range(0, len(handleList)): + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3707, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_8); + + /* "PyCafe.pyx":3708 + * + * v.reserve(len(handleList)) + * vRB.reserve(len(handleList)) # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3708, __pyx_L1_error) + __pyx_v_vRB.reserve(__pyx_t_8); + + /* "PyCafe.pyx":3709 + * v.reserve(len(handleList)) + * vRB.reserve(len(handleList)) + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3709, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":3711 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Wait for bundle + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3711, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3711, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":3714 + * + * # Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3715 + * # Wait for bundle + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":3714 + * + * # Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":3716 + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3717 + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3718 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3719 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * return status, vRB + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3717 + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3720 + * print("Error in def waitForBundledEvents: ") + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * return status, vRB + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3716 + * with nogil: + * status = self._c_cafe.waitForBundledEvents(v, vRB) + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") + */ + } + + /* "PyCafe.pyx":3721 + * self._c_cafe.printStatusMessage(status) + * return status + * return status, vRB # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def waitForBundledEvents(self, handleList): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vRB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3685 + * + * ################################################################################## + * def waitForBundledEvents(self, handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "waitForBundledEvents(self, handleList)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.waitForBundledEvents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleListB); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3728 + * ################################################################################## + * + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287getScalarArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287getScalarArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_v_cacheFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getScalarArray (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScalarArray") < 0)) __PYX_ERR(0, 3728, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_cacheFlag = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_cacheFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3728, __pyx_L3_error) + } else { + __pyx_v_cacheFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getScalarArray", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3728, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 3728, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_286getScalarArray(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_286getScalarArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + PyObject *__pyx_v_i = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_status; + PyObject *__pyx_v_j = NULL; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_bytesVal = 0; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + PyObject *__pyx_v_statusLocal = NULL; + unsigned int __pyx_v_dtn; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + unsigned int __pyx_t_9; + int __pyx_t_10; + std::vector ::size_type __pyx_t_11; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + std::vector ::size_type __pyx_t_14; + std::vector ::size_type __pyx_t_15; + std::vector ::size_type __pyx_t_16; + unsigned int __pyx_t_17; + std::vector ::size_type __pyx_t_18; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + int __pyx_t_22; + PyObject *__pyx_t_23 = NULL; + __Pyx_RefNannySetupContext("getScalarArray", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":3730 + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" # <<<<<<<<<<<<<< + * + * # cdef float [::1] mvFloat #C-contiguous + */ + __Pyx_INCREF(__pyx_kp_u_getScalarArray_handleList_str_dt); + __pyx_v__METHOD = __pyx_kp_u_getScalarArray_handleList_str_dt; + + /* "PyCafe.pyx":3734 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3735 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3735, __pyx_L1_error) + + /* "PyCafe.pyx":3734 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":3738 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3739 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3738 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":3740 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3741 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3741, __pyx_L1_error) + + /* "PyCafe.pyx":3740 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":3744 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3746 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3746, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3746, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3746, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3746, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3746, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3747 + * + * for i in range(0, len(handleList)): + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) # <<<<<<<<<<<<<< + * + * # pack into numpy + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3747, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToOne(__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3747, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3746 + * nelemPrevious = [] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3753 + * cdef vector[int] vStatus + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3753, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_7); + + /* "PyCafe.pyx":3754 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3754, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_7); + + /* "PyCafe.pyx":3756 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3756, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3756, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3756, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3756, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3756, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":3758 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vRB + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 3758, __pyx_L1_error) + } + + /* "PyCafe.pyx":3756 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3761 + * + * cdef vector[int] vRB + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if (cacheFlag == False): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":3763 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + __pyx_t_2 = ((__pyx_v_cacheFlag == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3766 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3767 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * # Check for error code 704: ICAFE_WAITING_FOR_PREV_CALLBACK + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3766 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":3775 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3776 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3776, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3776, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3776, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3776, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3777 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_11]) == ICAFE_WAITING_FOR_PREV_CALLBACK) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3779 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3779, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 3779, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 3779, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_13(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3779, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3780 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_v[__pyx_t_14]) == (__pyx_v_v[__pyx_t_15])) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3781 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3781, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_11]) == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3782 + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] # <<<<<<<<<<<<<< + * + * # ca_poll() Not required as above will flush! + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L1_error) + (__pyx_v_vStatus[__pyx_t_16]) = (__pyx_v_vStatus[__pyx_t_11]); + + /* "PyCafe.pyx":3781 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + } + + /* "PyCafe.pyx":3780 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + } + + /* "PyCafe.pyx":3779 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3777 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + } + + /* "PyCafe.pyx":3776 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3775 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + } + + /* "PyCafe.pyx":3788 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3789 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":3788 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":3790 + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3791 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3792 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3793 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":3791 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarArray: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":3790 + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") + */ + } + + /* "PyCafe.pyx":3763 + * status = ICAFE_NORMAL + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + } + + /* "PyCafe.pyx":3795 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":3796 + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtcheck=", dtcheck) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3796, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_9; + + /* "PyCafe.pyx":3800 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * localList = [] # <<<<<<<<<<<<<< + * cdef bytes bytesVal + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3803 + * cdef bytes bytesVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3805 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":3806 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3806, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_7); + + /* "PyCafe.pyx":3808 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3809 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3808 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L30; + } + __pyx_L30:; + } + } + + /* "PyCafe.pyx":3811 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3811, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3811, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3811, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3811, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3811, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3813 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * bytesVal = ( self.vStr[i] ) + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3812 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_9, __pyx_t_17)); + + /* "PyCafe.pyx":3815 + * handleList[i], nelemPrevious[i]) + * + * bytesVal = ( self.vStr[i] ) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + */ + __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_self->vStr[__pyx_t_18]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3816 + * + * bytesVal = ( self.vStr[i] ) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":3817 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3817, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3818 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":3819 + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3819, __pyx_L34_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3819, __pyx_L34_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3820 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3818 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L41_try_end; + __pyx_L34_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3821 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L35_exception_handled; + } + goto __pyx_L36_except_error; + __pyx_L36_except_error:; + + /* "PyCafe.pyx":3818 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L35_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L41_try_end:; + } + + /* "PyCafe.pyx":3817 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":3823 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3824 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":3825 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3825, __pyx_L43_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3825, __pyx_L43_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3826 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3824 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L50_try_end; + __pyx_L43_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3827 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L44_exception_handled; + } + goto __pyx_L45_except_error; + __pyx_L45_except_error:; + + /* "PyCafe.pyx":3824 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L44_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L50_try_end:; + } + + /* "PyCafe.pyx":3823 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":3829 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3830 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":3831 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3831, __pyx_L52_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3831, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3832 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3830 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L59_try_end; + __pyx_L52_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3833 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L53_exception_handled; + } + goto __pyx_L54_except_error; + __pyx_L54_except_error:; + + /* "PyCafe.pyx":3830 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L53_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L59_try_end:; + } + + /* "PyCafe.pyx":3829 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":3835 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3836 + * pass + * if not encoding: + * strVal = self.vStr[i] # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(((std::string)(__pyx_v_self->vStr[__pyx_t_18]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3835 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + } + + /* "PyCafe.pyx":3838 + * strVal = self.vStr[i] + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * return localList, status, vStatus + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 3838, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3838, __pyx_L1_error) + + /* "PyCafe.pyx":3811 + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3840 + * localList.append(strVal) + * + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3803 + * cdef bytes bytesVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3842 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":3844 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":3845 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3845, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_7); + + /* "PyCafe.pyx":3847 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3848 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3847 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L63; + } + __pyx_L63:; + } + } + + /* "PyCafe.pyx":3853 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3853, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3853, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3853, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3853, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3853, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3855 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3854 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_9)); + + /* "PyCafe.pyx":3853 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3861 + * + * # for i in range(0, len(self.vInt)): + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_23; + __pyx_t_23 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3842 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3863 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3865 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":3866 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3866, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_7); + + /* "PyCafe.pyx":3868 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":3869 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":3868 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L68; + } + __pyx_L68:; + } + } + + /* "PyCafe.pyx":3871 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3871, __pyx_L1_error) + __pyx_t_23 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_23)) || PyTuple_CheckExact(__pyx_t_23)) { + __pyx_t_4 = __pyx_t_23; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_23); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3871, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_23 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_23); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3871, __pyx_L1_error) + #else + __pyx_t_23 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_23 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_23); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3871, __pyx_L1_error) + #else + __pyx_t_23 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + } + } else { + __pyx_t_23 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_23)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3871, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_23); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_23); + __pyx_t_23 = 0; + + /* "PyCafe.pyx":3873 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":3872 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_9, __pyx_t_17)); + + /* "PyCafe.pyx":3871 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":3888 + * + * # for i in range(0, len(self.vFloat)): + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * # Native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_23); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_23 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3863 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":3901 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":3917 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3917, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3917, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3917, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3917, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3918 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3918, __pyx_L1_error) + (void)((__pyx_v_pvd[__pyx_t_12]).setNelem(1)); + + /* "PyCafe.pyx":3917 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3920 + * pvd[i].setNelem(1) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":3922 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3922, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3922, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3922, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3922, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3922, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3923 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3923, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3923, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_9)); + + /* "PyCafe.pyx":3922 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3925 + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3926 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":3927 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * if (cacheFlag): + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusLocal = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3928 + * statusFlag = True + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): # <<<<<<<<<<<<<< + * + * # if status !=ICAFE_NORMAL: + */ + __pyx_t_1 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3934 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3934, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3934, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3934, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3934, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":3935 + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3935, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3935, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3936 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3936, __pyx_L1_error) + __pyx_t_1 = (((__pyx_v_pvd[__pyx_t_12]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3937 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_12 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_23 = PyTuple_New(5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_kp_u_Error_in_Element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getScalarArray); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getScalarArray); + PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_kp_u_in_PyCafe_def_getScalarArray); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":3939 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":3940 + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3940, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_9)); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + + /* "PyCafe.pyx":3939 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_23); + __pyx_t_3 = 0; + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":3941 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3941, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":3942 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_t_12]).getStatus()); + + /* "PyCafe.pyx":3943 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_1 = (__pyx_v_statusFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3944 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3944, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF_SET(__pyx_v_statusLocal, __pyx_t_23); + __pyx_t_23 = 0; + + /* "PyCafe.pyx":3945 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * # + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":3943 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":3936 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarArray") + */ + } + + /* "PyCafe.pyx":3934 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3928 + * statusFlag = True + * statusLocal = ICAFE_NORMAL + * if (cacheFlag): # <<<<<<<<<<<<<< + * + * # if status !=ICAFE_NORMAL: + */ + } + + /* "PyCafe.pyx":3955 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_localList, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3958 + * + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_5 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_23 = PyTuple_New(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_23 = __pyx_t_5; __Pyx_INCREF(__pyx_t_23); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_8 = Py_TYPE(__pyx_t_23)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3958, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_23))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_23)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3958, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_23, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_23)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 3958, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_23, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_23); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 3958, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3960 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3960, __pyx_L1_error) + __pyx_v_dtn = (__pyx_v_pvd[__pyx_t_12]).getDataType(); + + /* "PyCafe.pyx":3961 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_9; + + /* "PyCafe.pyx":3967 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":3968 + * + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3968, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3969 + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":3970 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_t_15]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3970, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3971 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":3972 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3972, __pyx_L83_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3972, __pyx_L83_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3973 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3971 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L90_try_end; + __pyx_L83_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3974 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L84_exception_handled; + } + goto __pyx_L85_except_error; + __pyx_L85_except_error:; + + /* "PyCafe.pyx":3971 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L84_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L90_try_end:; + } + + /* "PyCafe.pyx":3970 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":3976 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3977 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":3978 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3978, __pyx_L92_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3978, __pyx_L92_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3979 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3977 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L99_try_end; + __pyx_L92_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3980 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L93_exception_handled; + } + goto __pyx_L94_except_error; + __pyx_L94_except_error:; + + /* "PyCafe.pyx":3977 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L93_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L99_try_end:; + } + + /* "PyCafe.pyx":3976 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":3982 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3983 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":3984 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 3984, __pyx_L101_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3984, __pyx_L101_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3985 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":3983 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L108_try_end; + __pyx_L101_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3986 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L102_exception_handled; + } + goto __pyx_L103_except_error; + __pyx_L103_except_error:; + + /* "PyCafe.pyx":3983 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L102_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L108_try_end:; + } + + /* "PyCafe.pyx":3982 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":3988 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3989 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3989, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3988 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":3991 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * ##localList.append(pvd[i].getAsString()) + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 3991, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3991, __pyx_L1_error) + + /* "PyCafe.pyx":3967 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":3995 + * ##localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3995, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3994 + * + * ##localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":3997 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3997, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3997, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3996 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4001 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4001, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPV((__pyx_v_pvd[__pyx_t_12]).getPVName())) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4002 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4002, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4002, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4002, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4001 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L110; + } + + /* "PyCafe.pyx":4004 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4004, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4004, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L110:; + + /* "PyCafe.pyx":3998 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4008 + * elif dtcheck == CAFE_CHAR: + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4008, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4008, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4008, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4006 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4010 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4010, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4010, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4010, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4009 + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4012 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4012, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4011 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":4014 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") + */ + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4014, __pyx_L1_error) + + /* "PyCafe.pyx":4015 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarArray:") + * print("Entering 0 for element", i, + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4016 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4017 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") + * print("Entering 0 for element", i, # <<<<<<<<<<<<<< + * "as channel is not connected!") + * + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Entering_0_for_element); + __Pyx_GIVEREF(__pyx_kp_u_Entering_0_for_element); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Entering_0_for_element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_as_channel_is_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_as_channel_is_not_connected); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_as_channel_is_not_connected); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4017, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4015 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarArray:") + * print("Entering 0 for element", i, + */ + } + break; + } + + /* "PyCafe.pyx":3958 + * + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + } + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":4023 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + __pyx_t_2 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4024 + * # free(pvd) + * if cacheFlag: + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * + * # use vstatus instead of statusList (as cache is NoWait) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4024, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_localList); + __Pyx_INCREF(__pyx_v_statusLocal); + __Pyx_GIVEREF(__pyx_v_statusLocal); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_statusLocal); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_v_statusList); + __pyx_r = __pyx_t_23; + __pyx_t_23 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4023 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + } + + /* "PyCafe.pyx":4027 + * + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_23); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); + __pyx_t_23 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3728 + * ################################################################################## + * + * def getScalarArray(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "getScalarArray(handleList, str dt, bint cacheFlag)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_23); + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_statusLocal); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4038 + * ################################################################################## + * + * def getStrScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='str') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288getStrScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrScalarList", 0); + + /* "PyCafe.pyx":4040 + * def getStrScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='str') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 4040, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4038 + * ################################################################################## + * + * def getStrScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='str') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4043 + * + * ################################################################################## + * def getIntScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='int') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_290getIntScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntScalarList", 0); + + /* "PyCafe.pyx":4045 + * def getIntScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='int') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 4045, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4043 + * + * ################################################################################## + * def getIntScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='int') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4048 + * + * ################################################################################## + * def getFloatScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='float') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatScalarList (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handleList)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_292getFloatScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatScalarList", 0); + + /* "PyCafe.pyx":4050 + * def getFloatScalarList(self, handleList): + * ################################################################################## + * return self.getScalarList(handleList, dt='float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 4050, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4048 + * + * ################################################################################## + * def getFloatScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='float') + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4053 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + CYTHON_UNUSED PyObject *__pyx_v_dictFlag = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getScalarList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,&__pyx_n_s_dictFlag,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + + /* "PyCafe.pyx":4054 + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', + * cacheFlag: bool = False, dictFlag: bool = False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getScalarList(handleList, str dt, bint cacheFlag)" + */ + values[2] = ((PyObject *)Py_False); + values[3] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dictFlag); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScalarList") < 0)) __PYX_ERR(0, 4053, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + __pyx_v_dictFlag = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getScalarList", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4053, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4053, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_294getScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag, __pyx_v_dictFlag); + + /* "PyCafe.pyx":4053 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_294getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, CYTHON_UNUSED PyObject *__pyx_v_dictFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + PyObject *__pyx_v_i = NULL; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_status; + PyObject *__pyx_v_bytesVal = 0; + PyObject *__pyx_v_j = NULL; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_localList = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + PyObject *__pyx_v_statusLocal = NULL; + unsigned int __pyx_v_dtn; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + unsigned int __pyx_t_9; + int __pyx_t_10; + std::vector ::size_type __pyx_t_11; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + std::vector ::size_type __pyx_t_14; + std::vector ::size_type __pyx_t_15; + std::vector ::size_type __pyx_t_16; + unsigned int __pyx_t_17; + std::vector ::size_type __pyx_t_18; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + int __pyx_t_22; + PyObject *__pyx_t_23 = NULL; + __Pyx_RefNannySetupContext("getScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":4056 + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + * cdef str _METHOD = "getScalarList(handleList, str dt, bint cacheFlag)" # <<<<<<<<<<<<<< + * + * # cdef float [::1] mvFloat #C-contiguous + */ + __Pyx_INCREF(__pyx_kp_u_getScalarList_handleList_str_dt); + __pyx_v__METHOD = __pyx_kp_u_getScalarList_handleList_str_dt; + + /* "PyCafe.pyx":4060 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be of handles or PVs") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4061 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4061, __pyx_L1_error) + + /* "PyCafe.pyx":4060 + * # cdef float [::1] mvFloat #C-contiguous + * + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":4064 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4064, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4065 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4064 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":4066 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4066, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4067 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4067, __pyx_L1_error) + + /* "PyCafe.pyx":4066 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":4070 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4074 + * + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4074, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4074, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4074, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4074, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4075 + * + * for i in range(0, len(handleList)): + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) # <<<<<<<<<<<<<< + * + * #c=self.hh.getNelemClient(handleList[i]) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToOne(__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4075, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4074 + * + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) + * + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4088 + * cdef vector[int] vStatus + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4089 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4089, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4091 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4091, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4091, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4091, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4091, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4091, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":4093 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vRB + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 4093, __pyx_L1_error) + } + + /* "PyCafe.pyx":4091 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4096 + * + * cdef vector[int] vRB + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * cdef bytes bytesVal + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4100 + * cdef bytes bytesVal + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_cacheFlag, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4100, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4103 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4104 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4103 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":4116 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4117 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4117, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4117, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4117, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4117, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4118 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4118, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_11]) == ICAFE_WAITING_FOR_PREV_CALLBACK) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4120 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4120, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 4120, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 4120, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_13(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4120, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4121 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4121, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4121, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_v[__pyx_t_14]) == (__pyx_v_v[__pyx_t_15])) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4122 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4122, __pyx_L1_error) + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_11]) == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4123 + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] # <<<<<<<<<<<<<< + * + * # ca_poll() Not required as above will flush! + */ + __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4123, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_16 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4123, __pyx_L1_error) + (__pyx_v_vStatus[__pyx_t_16]) = (__pyx_v_vStatus[__pyx_t_11]); + + /* "PyCafe.pyx":4122 + * for j in range(0, (i-1)): + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i] = vStatus[j] + * + */ + } + + /* "PyCafe.pyx":4121 + * # getHandle + * for j in range(0, (i-1)): + * if(v[j] == v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j] == ICAFE_NORMAL): + * vStatus[i] = vStatus[j] + */ + } + + /* "PyCafe.pyx":4120 + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + * for j in range(0, (i-1)): # <<<<<<<<<<<<<< + * if(v[j] == v[i]): + * if (vStatus[j] == ICAFE_NORMAL): + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4118 + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): # <<<<<<<<<<<<<< + * # getHandle + * for j in range(0, (i-1)): + */ + } + + /* "PyCafe.pyx":4117 + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): + * for i in range(0, len(vStatus)): # <<<<<<<<<<<<<< + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + * # getHandle + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4116 + * # Functionality not yet moved to CAFE:: + * # Required for when dt='native' + * if (status != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * for i in range(0, len(vStatus)): + * if (vStatus[i] == ICAFE_WAITING_FOR_PREV_CALLBACK): + */ + } + + /* "PyCafe.pyx":4128 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4129 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * + * if (statusBundle != ICAFE_NORMAL): + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":4128 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":4131 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4132 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4133 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4134 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":4132 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getScalarList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":4131 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") + */ + } + + /* "PyCafe.pyx":4100 + * cdef bytes bytesVal + * + * if (cacheFlag == False): # <<<<<<<<<<<<<< + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + */ + } + + /* "PyCafe.pyx":4136 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":4137 + * + * cdef unsigned int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtcheck=", dtcheck) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_9; + + /* "PyCafe.pyx":4141 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4143 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":4144 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4144, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4146 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4147 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4146 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L30; + } + __pyx_L30:; + } + } + + /* "PyCafe.pyx":4150 + * + * + * localList=[] # <<<<<<<<<<<<<< + * # statusList=[] + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4153 + * # statusList=[] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4153, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4153, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4153, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4153, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4153, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4155 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * bytesVal = ( self.vStr[i] ) + * encoding = False + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4154 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * bytesVal = ( self.vStr[i] ) + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_9, __pyx_t_17)); + + /* "PyCafe.pyx":4156 + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + * bytesVal = ( self.vStr[i] ) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + */ + __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4156, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_self->vStr[__pyx_t_18]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4157 + * handleList[i], nelemPrevious[i]) + * bytesVal = ( self.vStr[i] ) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4158 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4158, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4159 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":4160 + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4160, __pyx_L34_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4160, __pyx_L34_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4161 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4159 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L41_try_end; + __pyx_L34_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4162 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L35_exception_handled; + } + goto __pyx_L36_except_error; + __pyx_L36_except_error:; + + /* "PyCafe.pyx":4159 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L35_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L41_try_end:; + } + + /* "PyCafe.pyx":4158 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handleList[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4164 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4165 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":4166 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4166, __pyx_L43_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4166, __pyx_L43_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4167 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4165 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L50_try_end; + __pyx_L43_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4168 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L44_exception_handled; + } + goto __pyx_L45_except_error; + __pyx_L45_except_error:; + + /* "PyCafe.pyx":4165 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L44_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L50_try_end:; + } + + /* "PyCafe.pyx":4164 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4170 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":4172 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4172, __pyx_L52_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4172, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4173 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L59_try_end; + __pyx_L52_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4174 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L53_exception_handled; + } + goto __pyx_L54_except_error; + __pyx_L54_except_error:; + + /* "PyCafe.pyx":4171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L53_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L59_try_end:; + } + + /* "PyCafe.pyx":4170 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4176 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4177 + * pass + * if not encoding: + * strVal = self.vStr[i] # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_self->vStr[__pyx_t_18])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4176 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + } + + /* "PyCafe.pyx":4179 + * strVal = self.vStr[i] + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * return localList, status, vStatus + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4179, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4179, __pyx_L1_error) + + /* "PyCafe.pyx":4153 + * # statusList=[] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4181 + * localList.append(strVal) + * + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4141 + * #print ("dt=", dt, "dtcheck=", dtcheck) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4183 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":4185 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":4186 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4186, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4188 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4189 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * + * # for i in range(0, len(vStatus)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4188 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L63; + } + __pyx_L63:; + } + } + + /* "PyCafe.pyx":4194 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4194, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4194, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4194, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4194, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4194, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4196 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # localList=[] + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4195 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_9)); + + /* "PyCafe.pyx":4194 + * #print ("status " , vStatus[i], " i", i, self._c_cafe.getPVFromHandle(handleList[i])) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4202 + * + * # for i in range(0, len(self.vInt)): + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_23; + __pyx_t_23 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4183 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4204 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4206 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":4207 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4207, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4209 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4210 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4209 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L68; + } + __pyx_L68:; + } + } + + /* "PyCafe.pyx":4212 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4212, __pyx_L1_error) + __pyx_t_23 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(PyList_CheckExact(__pyx_t_23)) || PyTuple_CheckExact(__pyx_t_23)) { + __pyx_t_4 = __pyx_t_23; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_23); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4212, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_23 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_23); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4212, __pyx_L1_error) + #else + __pyx_t_23 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_23 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_23); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4212, __pyx_L1_error) + #else + __pyx_t_23 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + } + } else { + __pyx_t_23 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_23)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4212, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_23); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_23); + __pyx_t_23 = 0; + + /* "PyCafe.pyx":4214 + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * #for i in range(0, len(vStatus)): + */ + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":4213 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_9, __pyx_t_17)); + + /* "PyCafe.pyx":4212 + * status = self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4229 + * + * # for i in range(0, len(self.vFloat)): + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * # Native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_23); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_23 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4204 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":4241 + * + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * #for i in range (0, len(handleList)): + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":4256 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4256, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4256, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4256, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4256, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4257 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4257, __pyx_L1_error) + (void)((__pyx_v_pvd[__pyx_t_12]).setNelem(1)); + + /* "PyCafe.pyx":4256 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4259 + * pvd[i].setNelem(1) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":4261 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4261, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4261, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4261, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4261, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4261, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4262 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4262, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4262, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_17, __pyx_t_9)); + + /* "PyCafe.pyx":4261 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4264 + * self._c_cafe.setNelemToPrevious(handleList[i], nelemPrevious[i]) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4265 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":4266 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_statusLocal = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4277 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_3 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4277, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4277, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4277, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_8(__pyx_t_5); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4277, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4278 + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4278, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4279 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4279, __pyx_L1_error) + __pyx_t_1 = (((__pyx_v_pvd[__pyx_t_12]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4280 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_12 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4280, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_23 = PyTuple_New(5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_kp_u_Error_in_Element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getScalarList); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getScalarList); + PyTuple_SET_ITEM(__pyx_t_23, 4, __pyx_kp_u_in_PyCafe_def_getScalarList); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4282 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":4283 + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_23); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_9)); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + + /* "PyCafe.pyx":4282 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_23); + __pyx_t_3 = 0; + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":4284 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4284, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":4285 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4285, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_t_12]).getStatus()); + + /* "PyCafe.pyx":4286 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_1 = (__pyx_v_statusFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4287 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4287, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getStatus()); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF_SET(__pyx_v_statusLocal, __pyx_t_23); + __pyx_t_23 = 0; + + /* "PyCafe.pyx":4288 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * # + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":4286 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":4279 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getScalarList") + */ + } + + /* "PyCafe.pyx":4277 + * # self._c_cafe.printStatusMessage(status) + * # status=ICAFE_NORMAL + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4298 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4301 + * + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_5 = __Pyx_PyInt_From_int(((int)__pyx_v_v.size())); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_23 = PyTuple_New(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_23 = __pyx_t_5; __Pyx_INCREF(__pyx_t_23); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_23 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_8 = Py_TYPE(__pyx_t_23)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4301, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_23))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_23)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_23, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4301, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_23, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_23)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_23, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 4301, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_23, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_8(__pyx_t_23); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 4301, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4303 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4303, __pyx_L1_error) + __pyx_v_dtn = (__pyx_v_pvd[__pyx_t_12]).getDataType(); + + /* "PyCafe.pyx":4304 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_9; + + /* "PyCafe.pyx":4310 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4312 + * if dtcheck == CAFE_STRING: + * + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4312, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4313 + * + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4314 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_15 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4314, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_t_15]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4314, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4315 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":4316 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4316, __pyx_L82_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4316, __pyx_L82_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4317 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4315 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L89_try_end; + __pyx_L82_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4318 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L83_exception_handled; + } + goto __pyx_L84_except_error; + __pyx_L84_except_error:; + + /* "PyCafe.pyx":4315 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L83_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L89_try_end:; + } + + /* "PyCafe.pyx":4314 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4320 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4321 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_21); + /*try:*/ { + + /* "PyCafe.pyx":4322 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4322, __pyx_L91_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4322, __pyx_L91_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4323 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4321 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + goto __pyx_L98_try_end; + __pyx_L91_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4324 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L92_exception_handled; + } + goto __pyx_L93_except_error; + __pyx_L93_except_error:; + + /* "PyCafe.pyx":4321 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + goto __pyx_L1_error; + __pyx_L92_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); + __pyx_L98_try_end:; + } + + /* "PyCafe.pyx":4320 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4326 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4327 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_20); + __Pyx_XGOTREF(__pyx_t_19); + /*try:*/ { + + /* "PyCafe.pyx":4328 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4328, __pyx_L100_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4328, __pyx_L100_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4329 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4327 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + goto __pyx_L107_try_end; + __pyx_L100_error:; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4330 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_22) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L101_exception_handled; + } + goto __pyx_L102_except_error; + __pyx_L102_except_error:; + + /* "PyCafe.pyx":4327 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + goto __pyx_L1_error; + __pyx_L101_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_20); + __Pyx_XGIVEREF(__pyx_t_19); + __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); + __pyx_L107_try_end:; + } + + /* "PyCafe.pyx":4326 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4332 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4333 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4333, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4332 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":4335 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_SHORT: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4335, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4335, __pyx_L1_error) + + /* "PyCafe.pyx":4310 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4338 + * + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4338, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4337 + * localList.append(strVal) + * + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4340 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4340, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4339 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4344 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4344, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPV((__pyx_v_pvd[__pyx_t_12]).getPVName())) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4345 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4345, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4344 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName())): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L109; + } + + /* "PyCafe.pyx":4347 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4347, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L109:; + + /* "PyCafe.pyx":4341 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4351 + * elif dtcheck == CAFE_CHAR: + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4351, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4349 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4353 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4352 + * # pvd[i].getAsChar() + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4355 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4355, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4354 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":4357 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") + */ + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 4357, __pyx_L1_error) + + /* "PyCafe.pyx":4358 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarList:") + * print("Entering 0 for element", i, + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4359 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4360 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") + * print("Entering 0 for element", i, # <<<<<<<<<<<<<< + * "as channel is not connected!") + * + */ + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Entering_0_for_element); + __Pyx_GIVEREF(__pyx_kp_u_Entering_0_for_element); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Entering_0_for_element); + __Pyx_INCREF(__pyx_v_i); + __Pyx_GIVEREF(__pyx_v_i); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_i); + __Pyx_INCREF(__pyx_kp_u_as_channel_is_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_as_channel_is_not_connected); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_as_channel_is_not_connected); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4358 + * else: + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: # <<<<<<<<<<<<<< + * print("def getScalarList:") + * print("Entering 0 for element", i, + */ + } + break; + } + + /* "PyCafe.pyx":4301 + * + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + } + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + + /* "PyCafe.pyx":4366 + * + * # free(pvd) + * if (cacheFlag == True): # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + __pyx_t_23 = PyObject_RichCompare(__pyx_v_cacheFlag, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4366, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4367 + * # free(pvd) + * if (cacheFlag == True): + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * + * # use vstatus instead of statusList (as cache is NoWait) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_localList); + __Pyx_INCREF(__pyx_v_statusLocal); + __Pyx_GIVEREF(__pyx_v_statusLocal); + PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_v_statusLocal); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_v_statusList); + __pyx_r = __pyx_t_23; + __pyx_t_23 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4366 + * + * # free(pvd) + * if (cacheFlag == True): # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * + */ + } + + /* "PyCafe.pyx":4370 + * + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, statusNoWait, vStatus # <<<<<<<<<<<<<< + * # return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_statusNoWait); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 4370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_23); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); + __pyx_t_23 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4053 + * + * ################################################################################## + * def getScalarList(self, handleList, dt: str = 'native', # <<<<<<<<<<<<<< + * cacheFlag: bool = False, dictFlag: bool = False): + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_23); + __Pyx_AddTraceback("PyCafe.CyCafe.getScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_j); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_statusLocal); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4378 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297getDictionary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297getDictionary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pvhandleList = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_cacheFlag = 0; + PyObject *__pyx_v_scalarOnly = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDictionary (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pvhandleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,&__pyx_n_s_scalarOnly,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject *)Py_False); + + /* "PyCafe.pyx":4379 + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, + * scalarOnly: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + * + */ + values[3] = ((PyObject *)Py_False); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvhandleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scalarOnly); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDictionary") < 0)) __PYX_ERR(0, 4378, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_pvhandleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_cacheFlag = values[2]; + __pyx_v_scalarOnly = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getDictionary", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4378, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getDictionary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_296getDictionary(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pvhandleList, __pyx_v_dt, __pyx_v_cacheFlag, __pyx_v_scalarOnly); + + /* "PyCafe.pyx":4378 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_296getDictionary(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvhandleList, PyObject *__pyx_v_dt, PyObject *__pyx_v_cacheFlag, PyObject *__pyx_v_scalarOnly) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + CYTHON_UNUSED PyObject *__pyx_v_pvList = NULL; + PyObject *__pyx_v_handleList = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_statusOverall = NULL; + PyObject *__pyx_v_status = NULL; + PyObject *__pyx_v_pvdict = NULL; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v__val = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; + Py_ssize_t __pyx_t_13; + unsigned int __pyx_t_14; + __Pyx_RefNannySetupContext("getDictionary", 0); + + /* "PyCafe.pyx":4380 + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" # <<<<<<<<<<<<<< + * + * pvList = None + */ + __Pyx_INCREF(__pyx_kp_u_getDictionary_handleList_dt_cach); + __pyx_v__METHOD = __pyx_kp_u_getDictionary_handleList_dt_cach; + + /* "PyCafe.pyx":4382 + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + * + * pvList = None # <<<<<<<<<<<<<< + * handleList = pvhandleList + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_pvList = Py_None; + + /* "PyCafe.pyx":4383 + * + * pvList = None + * handleList = pvhandleList # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_v_pvhandleList); + __pyx_v_handleList = __pyx_v_pvhandleList; + + /* "PyCafe.pyx":4385 + * handleList = pvhandleList + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4386 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getDictionary. \n" + + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4387 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getDictionary. \n" + + * "First input argument should be " + + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_handleList); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_t_1 = ((!__pyx_t_2) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4388 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getDictionary. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4388, __pyx_L1_error) + + /* "PyCafe.pyx":4387 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getDictionary. \n" + + * "First input argument should be " + + */ + } + + /* "PyCafe.pyx":4385 + * handleList = pvhandleList + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4393 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4394 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4394, __pyx_L1_error) + + /* "PyCafe.pyx":4393 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":4397 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4398 + * + * if isinstance(handleList[0], (str)): + * pvList = handleList # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_DECREF_SET(__pyx_v_pvList, __pyx_v_handleList); + + /* "PyCafe.pyx":4399 + * if isinstance(handleList[0], (str)): + * pvList = handleList + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4397 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4400 + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4401 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4401, __pyx_L1_error) + + /* "PyCafe.pyx":4400 + * pvList = handleList + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":4404 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if scalarOnly: # <<<<<<<<<<<<<< + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_scalarOnly); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4404, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":4405 + * + * if scalarOnly: + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) # <<<<<<<<<<<<<< + * else: + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getScalarList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_dt); + __Pyx_INCREF(__pyx_v_cacheFlag); + __Pyx_GIVEREF(__pyx_v_cacheFlag); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_cacheFlag); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 4405, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 4405, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_unpacking_done; + __pyx_L10_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 4405, __pyx_L1_error) + __pyx_L11_unpacking_done:; + } + __pyx_v_value = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_statusOverall = __pyx_t_8; + __pyx_t_8 = 0; + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4404 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if scalarOnly: # <<<<<<<<<<<<<< + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":4407 + * value, statusOverall, status =self.getScalarList(handleList, dt, cacheFlag) + * else: + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) # <<<<<<<<<<<<<< + * + * pvdict = OrderedDict() + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else + #endif + { + __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_dt); + __Pyx_INCREF(__pyx_v_cacheFlag); + __Pyx_GIVEREF(__pyx_v_cacheFlag); + PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_v_cacheFlag); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 4407, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_8 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); + #else + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_5); + index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 4407, __pyx_L1_error) + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 4407, __pyx_L1_error) + __pyx_L13_unpacking_done:; + } + __pyx_v_value = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_statusOverall = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_status = __pyx_t_8; + __pyx_t_8 = 0; + } + __pyx_L9:; + + /* "PyCafe.pyx":4409 + * value, statusOverall, status =self.getCompoundList(handleList, dt, cacheFlag) + * + * pvdict = OrderedDict() # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * _val = value[i] + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_pvdict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4410 + * + * pvdict = OrderedDict() + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * _val = value[i] + * if status[i] != ICAFE_NORMAL: + */ + __pyx_t_11 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4410, __pyx_L1_error) + __pyx_t_12 = __pyx_t_11; + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { + __pyx_v_i = __pyx_t_13; + + /* "PyCafe.pyx":4411 + * pvdict = OrderedDict() + * for i in range(0, len(handleList)): + * _val = value[i] # <<<<<<<<<<<<<< + * if status[i] != ICAFE_NORMAL: + * _val = None + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v__val, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4412 + * for i in range(0, len(handleList)): + * _val = value[i] + * if status[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_status, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4413 + * _val = value[i] + * if status[i] != ICAFE_NORMAL: + * _val = None # <<<<<<<<<<<<<< + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + * + */ + __Pyx_INCREF(Py_None); + __Pyx_DECREF_SET(__pyx_v__val, Py_None); + + /* "PyCafe.pyx":4412 + * for i in range(0, len(handleList)): + * _val = value[i] + * if status[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + */ + } + + /* "PyCafe.pyx":4414 + * if status[i] != ICAFE_NORMAL: + * _val = None + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val # <<<<<<<<<<<<<< + * + * return pvdict, statusOverall, status + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(PyObject_SetItem(__pyx_v_pvdict, __pyx_t_4, __pyx_v__val) < 0)) __PYX_ERR(0, 4414, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":4416 + * pvdict[self._c_cafe.getPVFromHandle(handleList[i])] = _val + * + * return pvdict, statusOverall, status # <<<<<<<<<<<<<< + * + * # int alarmStatus=None, int alarmSev=None): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_pvdict); + __Pyx_GIVEREF(__pyx_v_pvdict); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pvdict); + __Pyx_INCREF(__pyx_v_statusOverall); + __Pyx_GIVEREF(__pyx_v_statusOverall); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_statusOverall); + __Pyx_INCREF(__pyx_v_status); + __Pyx_GIVEREF(__pyx_v_status); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_status); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":4378 + * + * + * def getDictionary(self, pvhandleList, dt: str = 'native', cacheFlag: bool = False, # <<<<<<<<<<<<<< + * scalarOnly: bool = False): + * cdef str _METHOD = "getDictionary(handleList, dt, cacheFlag )" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.getDictionary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pvList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_statusOverall); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF(__pyx_v_pvdict); + __Pyx_XDECREF(__pyx_v__val); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4420 + * # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_299getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_299getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_v_cacheFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCompoundList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_dt,&__pyx_n_s_cacheFlag,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cacheFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCompoundList") < 0)) __PYX_ERR(0, 4420, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handleList = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_cacheFlag = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_cacheFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4420, __pyx_L3_error) + } else { + __pyx_v_cacheFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCompoundList", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4420, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4420, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_298getCompoundList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_dt, __pyx_v_cacheFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_298getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt, int __pyx_v_cacheFlag) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + std::vector __pyx_v_vRB; + int __pyx_v_flagCompound; + unsigned int __pyx_v_nelemLocal; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + int __pyx_v_statusBundle; + int __pyx_v_dtcheck; + PyObject *__pyx_v_bytesVal = 0; + PyObject *__pyx_v_localList = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + PyObject *__pyx_v_statusList = NULL; + int __pyx_v_statusFlag; + int __pyx_v_statusLocal; + unsigned int __pyx_v_dtn; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + int __pyx_t_17; + int __pyx_t_18; + unsigned int __pyx_t_19; + long __pyx_t_20; + unsigned int __pyx_t_21; + unsigned int __pyx_t_22; + __Pyx_RefNannySetupContext("getCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":4422 + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_kp_u_getCompoundList_handleList_str_d); + __pyx_v__METHOD = __pyx_kp_u_getCompoundList_handleList_str_d; + + /* "PyCafe.pyx":4424 + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4425 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4426 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_handleList); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4426, __pyx_L1_error) + __pyx_t_1 = ((!__pyx_t_2) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4427 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4427, __pyx_L1_error) + + /* "PyCafe.pyx":4426 + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: # <<<<<<<<<<<<<< + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + + * "First input argument should be " + + */ + } + + /* "PyCafe.pyx":4424 + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4432 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4433 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4433, __pyx_L1_error) + + /* "PyCafe.pyx":4432 + * "CAFE 'group' name")) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":4436 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4437 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4436 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4438 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4439 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4439, __pyx_L1_error) + + /* "PyCafe.pyx":4438 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L6:; + } + __pyx_L3:; + + /* "PyCafe.pyx":4448 + * cdef vector[int] vRB + * + * v.reserve(len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4448, __pyx_L1_error) + __pyx_v_v.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4449 + * + * v.reserve(len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * cdef bint flagCompound = False + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4449, __pyx_L1_error) + __pyx_v_vStatus.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4451 + * vStatus.reserve(len(handleList)) + * + * cdef bint flagCompound = False # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemLocal = 1 + */ + __pyx_v_flagCompound = 0; + + /* "PyCafe.pyx":4453 + * cdef bint flagCompound = False + * + * cdef unsigned int nelemLocal = 1 # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_nelemLocal = 1; + + /* "PyCafe.pyx":4455 + * cdef unsigned int nelemLocal = 1 + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4455, __pyx_L1_error) + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":4457 + * for i in range(0, len(handleList)): + * # do this copy to avoid compiler warning messages + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * if (nelemLocal == 1): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 4457, __pyx_L1_error) + } + + /* "PyCafe.pyx":4459 + * v.push_back(handleList[i]) + * + * if (nelemLocal == 1): # <<<<<<<<<<<<<< + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + __pyx_t_2 = ((__pyx_v_nelemLocal == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4460 + * + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) # <<<<<<<<<<<<<< + * if nelemLocal > 1: + * flagCompound = True + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_nelemLocal = __pyx_v_self->hh.getNelemNative(__pyx_t_10); + + /* "PyCafe.pyx":4461 + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound = True + * + */ + __pyx_t_2 = ((__pyx_v_nelemLocal > 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4462 + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + * flagCompound = True # <<<<<<<<<<<<<< + * + * status = ICAFE_NORMAL + */ + __pyx_v_flagCompound = 1; + + /* "PyCafe.pyx":4461 + * if (nelemLocal == 1): + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound = True + * + */ + } + + /* "PyCafe.pyx":4459 + * v.push_back(handleList[i]) + * + * if (nelemLocal == 1): # <<<<<<<<<<<<<< + * nelemLocal = self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + } + } + + /* "PyCafe.pyx":4464 + * flagCompound = True + * + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if not cacheFlag: + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4466 + * status = ICAFE_NORMAL + * + * if not cacheFlag: # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + __pyx_t_2 = ((!(__pyx_v_cacheFlag != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4470 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * #print("getCompound", status, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4471 + * # Coercion from Python not allowed without the GIL + * with nogil: + * status = self._c_cafe.getV(v, vStatus) # <<<<<<<<<<<<<< + * #print("getCompound", status, vStatus) + * # ca_poll() Not required as above will flush! + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getV(__pyx_v_v, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4470 + * # Need to copy to a vector since + * # Coercion from Python not allowed without the GIL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getV(v, vStatus) + * #print("getCompound", status, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L16; + } + __pyx_L16:; + } + } + + /* "PyCafe.pyx":4477 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4478 + * + * with nogil: + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) # <<<<<<<<<<<<<< + * + * if (statusBundle != ICAFE_NORMAL): + */ + __pyx_v_statusBundle = __pyx_v_self->_c_cafe->waitForBundledEvents(__pyx_v_v, __pyx_v_vRB); + } + + /* "PyCafe.pyx":4477 + * # Wait for bundle + * + * with nogil: # <<<<<<<<<<<<<< + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":4480 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4481 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4482 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4483 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) # <<<<<<<<<<<<<< + * + * cdef int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_statusBundle); + + /* "PyCafe.pyx":4481 + * + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in def getCompoundList: ") + * self._c_cafe.printStatusMessage(statusBundle) + */ + } + + /* "PyCafe.pyx":4480 + * statusBundle = self._c_cafe.waitForBundledEvents(v, vRB) + * + * if (statusBundle != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") + */ + } + + /* "PyCafe.pyx":4466 + * status = ICAFE_NORMAL + * + * if not cacheFlag: # <<<<<<<<<<<<<< + * + * # Need to copy to a vector since + */ + } + + /* "PyCafe.pyx":4485 + * self._c_cafe.printStatusMessage(statusBundle) + * + * cdef int dtcheck = CAFE_NOT_REQUESTED # native type not yet know # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtcheck) + * + */ + __pyx_v_dtcheck = CAFE_NOT_REQUESTED; + + /* "PyCafe.pyx":4486 + * + * cdef int dtcheck = CAFE_NOT_REQUESTED # native type not yet know + * dtcheck = getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * cdef bytes bytesVal + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_11; + + /* "PyCafe.pyx":4489 + * + * cdef bytes bytesVal + * localList = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_localList = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":4493 + * + * # Use Scalar + * if not flagCompound: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + __pyx_t_2 = ((!(__pyx_v_flagCompound != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4495 + * if not flagCompound: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4497 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":4498 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4498, __pyx_L1_error) + __pyx_v_self->vStr.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4500 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4501 + * + * with nogil: + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * #warning: __pyx_v_i may be used uninitialized in this function + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4500 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":4504 + * + * #warning: __pyx_v_i may be used uninitialized in this function + * for i in range(0, len(v)): # <<<<<<<<<<<<<< + * bytesVal = ( self.vStr[i] ) + * encoding = False + */ + __pyx_t_4 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":4505 + * #warning: __pyx_v_i may be used uninitialized in this function + * for i in range(0, len(v)): + * bytesVal = ( self.vStr[i] ) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_self->vStr[__pyx_v_i]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4506 + * for i in range(0, len(v)): + * bytesVal = ( self.vStr[i] ) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4507 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4507, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4508 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":4509 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4509, __pyx_L29_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4509, __pyx_L29_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4510 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4508 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L36_try_end; + __pyx_L29_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4511 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L30_exception_handled; + } + goto __pyx_L31_except_error; + __pyx_L31_except_error:; + + /* "PyCafe.pyx":4508 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L30_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L36_try_end:; + } + + /* "PyCafe.pyx":4507 + * bytesVal = ( self.vStr[i] ) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4513 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4514 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":4515 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4515, __pyx_L38_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4515, __pyx_L38_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4516 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4514 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L45_try_end; + __pyx_L38_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4517 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L39_exception_handled; + } + goto __pyx_L40_except_error; + __pyx_L40_except_error:; + + /* "PyCafe.pyx":4514 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L39_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L45_try_end:; + } + + /* "PyCafe.pyx":4513 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4519 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4520 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":4521 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4521, __pyx_L47_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4521, __pyx_L47_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4522 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4520 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L54_try_end; + __pyx_L47_error:; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4523 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L48_exception_handled; + } + goto __pyx_L49_except_error; + __pyx_L49_except_error:; + + /* "PyCafe.pyx":4520 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L48_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L54_try_end:; + } + + /* "PyCafe.pyx":4519 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4525 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4526 + * pass + * if not encoding: + * strVal = self.vStr[i] # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(((std::string)(__pyx_v_self->vStr[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4525 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.vStr[i] + * + */ + } + + /* "PyCafe.pyx":4528 + * strVal = self.vStr[i] + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * return localList, status, vStatus + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4528, __pyx_L1_error) } + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4528, __pyx_L1_error) + } + + /* "PyCafe.pyx":4530 + * localList.append(strVal) + * + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4495 + * if not flagCompound: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4532 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":4534 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":4535 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4535, __pyx_L1_error) + __pyx_v_self->vInt.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4537 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4538 + * + * with nogil: + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * #print("getCompound", status, vStatus) + * return self.vInt, status, vStatus + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4537 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L58; + } + __pyx_L58:; + } + } + + /* "PyCafe.pyx":4540 + * status = self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * #print("getCompound", status, vStatus) + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_16; + __pyx_t_16 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4532 + * return localList, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4542 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4544 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":4545 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4545, __pyx_L1_error) + __pyx_v_self->vFloat.reserve(__pyx_t_7); + + /* "PyCafe.pyx":4547 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble( + * v, self.vFloat, vStatus) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4548 + * + * with nogil: + * status = self._c_cafe.getCacheVDouble( # <<<<<<<<<<<<<< + * v, self.vFloat, vStatus) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":4547 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheVDouble( + * v, self.vFloat, vStatus) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L61; + } + __pyx_L61:; + } + } + + /* "PyCafe.pyx":4551 + * v, self.vFloat, vStatus) + * + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_16 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); + __pyx_t_16 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4542 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":4493 + * + * # Use Scalar + * if not flagCompound: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + } + + /* "PyCafe.pyx":4559 + * # Does group exist? + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * # Required to allocate memory for shared pointer + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":4562 + * + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + */ + __pyx_t_11 = ((int)__pyx_v_v.size()); + __pyx_t_17 = __pyx_t_11; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_17; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4563 + * # Required to allocate memory for shared pointer + * for i in range(0, v.size()): #len(handleList)): + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) # <<<<<<<<<<<<<< + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4563, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemClient(__pyx_t_10))); + } + + /* "PyCafe.pyx":4565 + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * statusList = [] + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":4567 + * statusNoWait = self._c_cafe.getCachePVArrayNoWait(v, pvd) + * + * statusList = [] # <<<<<<<<<<<<<< + * statusFlag = True + * statusLocal = ICAFE_NORMAL + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4568 + * + * statusList = [] + * statusFlag = True # <<<<<<<<<<<<<< + * statusLocal = ICAFE_NORMAL + * + */ + __pyx_v_statusFlag = 1; + + /* "PyCafe.pyx":4569 + * statusList = [] + * statusFlag = True + * statusLocal = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if cacheFlag: + */ + __pyx_v_statusLocal = ICAFE_NORMAL; + + /* "PyCafe.pyx":4571 + * statusLocal = ICAFE_NORMAL + * + * if cacheFlag: # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_1 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4572 + * + * if cacheFlag: + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + */ + __pyx_t_11 = ((int)__pyx_v_v.size()); + __pyx_t_17 = __pyx_t_11; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_17; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4573 + * if cacheFlag: + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4573, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4574 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4575 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":4576 + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") # <<<<<<<<<<<<<< + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4575, __pyx_L1_error) + + /* "PyCafe.pyx":4575 + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: + * print("Error in Element ", i, " from ", len( # <<<<<<<<<<<<<< + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + */ + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_Element); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Error_in_Element); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_kp_u_from); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_from); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_in_PyCafe_def_getCompundList); + __Pyx_GIVEREF(__pyx_kp_u_in_PyCafe_def_getCompundList); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_in_PyCafe_def_getCompundList); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4577 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":4578 + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "PyCafe.pyx":4577 + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + * print("Handle= ", handleList[i], " PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_kp_u_Handle_2); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Handle_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_kp_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_PV_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4579 + * print("Handle= ", handleList[i], " PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + */ + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4580 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * if statusFlag: + * statusLocal = pvd[i].getStatus() + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":4581 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + __pyx_t_1 = (__pyx_v_statusFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4582 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: + * statusLocal = pvd[i].getStatus() # <<<<<<<<<<<<<< + * statusFlag = False + * + */ + __pyx_v_statusLocal = (__pyx_v_pvd[__pyx_v_i]).getStatus(); + + /* "PyCafe.pyx":4583 + * if statusFlag: + * statusLocal = pvd[i].getStatus() + * statusFlag = False # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn + */ + __pyx_v_statusFlag = 0; + + /* "PyCafe.pyx":4581 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * if statusFlag: # <<<<<<<<<<<<<< + * statusLocal = pvd[i].getStatus() + * statusFlag = False + */ + } + + /* "PyCafe.pyx":4574 + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + * if pvd[i].getStatus() != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("Error in Element ", i, " from ", len( + * handleList), " in PyCafe def getCompundList") + */ + } + } + + /* "PyCafe.pyx":4571 + * statusLocal = ICAFE_NORMAL + * + * if cacheFlag: # <<<<<<<<<<<<<< + * for i in range(0, v.size()): #len(handleList)): + * statusList.append(pvd[i].getStatus()) + */ + } + + /* "PyCafe.pyx":4587 + * cdef unsigned int dtn + * + * localList = [] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_localList, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4590 + * + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType() + */ + __pyx_t_11 = ((int)__pyx_v_v.size()); + __pyx_t_17 = __pyx_t_11; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_17; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":4592 + * for i in range(0, v.size()): #len(handleList)): + * + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":4593 + * + * dtn = pvd[i].getDataType() + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_18; + + /* "PyCafe.pyx":4595 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4596 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4597 + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4598 + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4599 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_3 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4599, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4600 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":4601 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4601, __pyx_L73_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4601, __pyx_L73_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4602 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4600 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L80_try_end; + __pyx_L73_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4603 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L74_exception_handled; + } + goto __pyx_L75_except_error; + __pyx_L75_except_error:; + + /* "PyCafe.pyx":4600 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L74_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L80_try_end:; + } + + /* "PyCafe.pyx":4599 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4605 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4606 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":4607 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4607, __pyx_L82_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4607, __pyx_L82_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4608 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4606 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L89_try_end; + __pyx_L82_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4609 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L83_exception_handled; + } + goto __pyx_L84_except_error; + __pyx_L84_except_error:; + + /* "PyCafe.pyx":4606 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L83_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L89_try_end:; + } + + /* "PyCafe.pyx":4605 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4611 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4612 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":4613 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4613, __pyx_L91_error) + } + __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4613, __pyx_L91_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4614 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4612 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L98_try_end; + __pyx_L91_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4615 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L92_exception_handled; + } + goto __pyx_L93_except_error; + __pyx_L93_except_error:; + + /* "PyCafe.pyx":4612 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L92_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L98_try_end:; + } + + /* "PyCafe.pyx":4611 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4617 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4618 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4618, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4617 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":4620 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) # <<<<<<<<<<<<<< + * + * #localList.append(pvd[i].getAsString()) + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4620, __pyx_L1_error) } + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4620, __pyx_L1_error) + + /* "PyCafe.pyx":4596 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * bytesVal = pvd[i].getAsString() + * encoding = False + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4624 + * #localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4623 + * + * #localList.append(pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4626 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4626, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4625 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4629 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_10) == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4630 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4630, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4629 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L100; + } + + /* "PyCafe.pyx":4632 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4632, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L100:; + + /* "PyCafe.pyx":4627 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4635 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4635, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4634 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4637 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4636 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4639 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) # no data + */ + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4639, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":4638 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":4641 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4641, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":4595 + * dtcheck = getMatchedDataType(dt, dtn) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * bytesVal = pvd[i].getAsString() + */ + goto __pyx_L71; + } + + /* "PyCafe.pyx":4643 + * localList.append(0) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4644 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4645 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString(j) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4647 + * for j in range(0, pvd[i].getNelem()): + * + * bytesVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + */ + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4648 + * + * bytesVal = pvd[i].getAsString(j) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4649 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle((__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4649, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4650 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":4651 + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4651, __pyx_L104_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4651, __pyx_L104_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4652 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4650 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L111_try_end; + __pyx_L104_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4653 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L105_exception_handled; + } + goto __pyx_L106_except_error; + __pyx_L106_except_error:; + + /* "PyCafe.pyx":4650 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L105_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L111_try_end:; + } + + /* "PyCafe.pyx":4649 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(v[i]): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4655 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4656 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":4657 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4657, __pyx_L113_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4657, __pyx_L113_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4658 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4656 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L120_try_end; + __pyx_L113_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4659 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L114_exception_handled; + } + goto __pyx_L115_except_error; + __pyx_L115_except_error:; + + /* "PyCafe.pyx":4656 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L114_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L120_try_end:; + } + + /* "PyCafe.pyx":4655 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4661 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4662 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":4663 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4663, __pyx_L122_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4663, __pyx_L122_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4664 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4662 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L129_try_end; + __pyx_L122_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4665 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_18) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L123_exception_handled; + } + goto __pyx_L124_except_error; + __pyx_L124_except_error:; + + /* "PyCafe.pyx":4662 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L123_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L129_try_end:; + } + + /* "PyCafe.pyx":4661 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4667 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4668 + * pass + * if not encoding: + * strVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * + * localListInner.append(strVal) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4667 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + } + + /* "PyCafe.pyx":4670 + * strVal = pvd[i].getAsString(j) + * + * localListInner.append(strVal) # <<<<<<<<<<<<<< + * #localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4670, __pyx_L1_error) } + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_v_strVal); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4670, __pyx_L1_error) + } + + /* "PyCafe.pyx":4644 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4673 + * #localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4674 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4674, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4672 + * localListInner.append(strVal) + * #localListInner.append(pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4676 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4677 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4675 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4680 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4682 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_21 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_21 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4682, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_21) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4683 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4682 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(handleList[i]) == 1: # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L137; + } + + /* "PyCafe.pyx":4685 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L137:; + } + + /* "PyCafe.pyx":4678 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":4688 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4690 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4690, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4687 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":4692 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4693 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":4691 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4695 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_19 = __pyx_t_10; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4696 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4696, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + /*else*/ { + + /* "PyCafe.pyx":4698 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(0) # no data + * localList.append(localListInner) + */ + __pyx_t_21 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_22 = __pyx_t_21; + for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_22; __pyx_t_20+=1) { + __pyx_v_j = __pyx_t_20; + + /* "PyCafe.pyx":4699 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4699, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":4694 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":4700 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 4700, __pyx_L1_error) + } + __pyx_L71:; + } + + /* "PyCafe.pyx":4703 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + */ + __pyx_t_1 = (__pyx_v_cacheFlag != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4704 + * # free(pvd) + * if cacheFlag: + * return localList, statusLocal, statusList # <<<<<<<<<<<<<< + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_statusLocal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4703 + * + * # free(pvd) + * if cacheFlag: # <<<<<<<<<<<<<< + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + */ + } + + /* "PyCafe.pyx":4706 + * return localList, statusLocal, statusList + * # use vstatus instead of statusList (as cache is NoWait) + * return localList, status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4420 + * # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native', bint cacheFlag=False): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundList(handleList, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4714 + * ################################################################################## + * + * def getCompoundPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCompoundPVGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCompoundPVGroup") < 0)) __PYX_ERR(0, 4714, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCompoundPVGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4714, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4714, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_300getCompoundPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + PyObject *__pyx_v_handleList = NULL; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + std::vector __pyx_v_hV; + Py_ssize_t __pyx_v_i; + CYTHON_UNUSED PyObject *__pyx_v_status = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_p1 = 0; + PyObject *__pyx_v_localListToStruct = NULL; + int __pyx_v_groupStatus; + PyObject *__pyx_v_ll = NULL; + PyObject *__pyx_v_aStatSev = NULL; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + int __pyx_t_12; + PyObject *__pyx_t_13 = NULL; + PyObject *(*__pyx_t_14)(PyObject *); + unsigned int __pyx_t_15; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_16; + int __pyx_t_17; + __Pyx_RefNannySetupContext("getCompoundPVGroup", 0); + + /* "PyCafe.pyx":4716 + * def getCompoundPVGroup(self, ghandleName, str dt='native'): + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCompoundPVGroup_ghandleName_s); + __pyx_v__METHOD = __pyx_kp_u_getCompoundPVGroup_ghandleName_s; + + /* "PyCafe.pyx":4718 + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":4719 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4720 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4720, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4719 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4721 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4722 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4722, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4721 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4725 + * else: + * + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if group handle, else if group name") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 4725, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4728 + * First input argument, should be of type if group handle, else if group name") + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4728, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handleList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4729 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4731 + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4732 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hV + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4736 + * cdef vector[unsigned int] hV + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * hV.push_back(handleList[i]) + * + */ + __pyx_t_9 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4736, __pyx_L1_error) + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":4737 + * + * for i in range(0, len(handleList)): + * hV.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4737, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + try { + __pyx_v_hV.push_back(__pyx_t_4); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 4737, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":4739 + * hV.push_back(handleList[i]) + * + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getCompoundList(handleList, dt) + */ + (void)(__pyx_v_self->hh.setCafeDbrTypeV(__pyx_v_hV, DBR_TIME)); + + /* "PyCafe.pyx":4741 + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) + * + * localList, status, statusList = self.getCompoundList(handleList, dt) # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_12 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_12 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_handleList, __pyx_v_dt}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_handleList, __pyx_v_dt}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_12, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_dt); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 4741, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_13 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 2; __pyx_t_7 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(0, 4741, __pyx_L1_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 4741, __pyx_L1_error) + __pyx_L9_unpacking_done:; + } + __Pyx_DECREF_SET(__pyx_v_localList, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_v_status = __pyx_t_8; + __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4745 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":4746 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":4745 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":4749 + * + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * cdef pvdata p1 + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":4753 + * cdef pvdata p1 + * + * localListToStruct = [] # <<<<<<<<<<<<<< + * + * cdef int groupStatus = ICAFE_NORMAL + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localListToStruct = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4755 + * localListToStruct = [] + * + * cdef int groupStatus = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_groupStatus = ICAFE_NORMAL; + + /* "PyCafe.pyx":4757 + * cdef int groupStatus = ICAFE_NORMAL + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * p1 = pvdata() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_15 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_15; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":4758 + * + * for i in range(0, pvg.getNPV()): + * p1 = pvdata() # <<<<<<<<<<<<<< + * + * # pvd[i].setDouble(localList[i]) + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvdata)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4761 + * + * # pvd[i].setDouble(localList[i]) + * p1 = PVDataHolderToStruct(pvd[i], dt) # <<<<<<<<<<<<<< + * + * if not isinstance(localList[i], (list)): + */ + __pyx_t_16.__pyx_n = 1; + __pyx_t_16.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_p1, ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4763 + * p1 = PVDataHolderToStruct(pvd[i], dt) + * + * if not isinstance(localList[i], (list)): # <<<<<<<<<<<<<< + * ll = [] + * ll.append(localList[i]) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyList_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4764 + * + * if not isinstance(localList[i], (list)): + * ll = [] # <<<<<<<<<<<<<< + * ll.append(localList[i]) + * p1.value = ll + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4765 + * if not isinstance(localList[i], (list)): + * ll = [] + * ll.append(localList[i]) # <<<<<<<<<<<<<< + * p1.value = ll + * else: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_5); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 4765, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4766 + * ll = [] + * ll.append(localList[i]) + * p1.value = ll # <<<<<<<<<<<<<< + * else: + * p1.value = localList[i] # put into List! + */ + __Pyx_INCREF(__pyx_v_ll); + __Pyx_GIVEREF(__pyx_v_ll); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = __pyx_v_ll; + + /* "PyCafe.pyx":4763 + * p1 = PVDataHolderToStruct(pvd[i], dt) + * + * if not isinstance(localList[i], (list)): # <<<<<<<<<<<<<< + * ll = [] + * ll.append(localList[i]) + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":4768 + * p1.value = ll + * else: + * p1.value = localList[i] # put into List! # <<<<<<<<<<<<<< + * + * p1.status = statusList[i] + */ + /*else*/ { + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_localList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4768, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 4768, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->value); + __Pyx_DECREF(__pyx_v_p1->value); + __pyx_v_p1->value = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + } + __pyx_L15:; + + /* "PyCafe.pyx":4770 + * p1.value = localList[i] # put into List! + * + * p1.status = statusList[i] # <<<<<<<<<<<<<< + * + * if groupStatus == ICAFE_NORMAL: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4770, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->status = __pyx_t_12; + + /* "PyCafe.pyx":4772 + * p1.status = statusList[i] + * + * if groupStatus == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * groupStatus = statusList[i] + * + */ + __pyx_t_2 = ((__pyx_v_groupStatus == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4773 + * + * if groupStatus == ICAFE_NORMAL: + * groupStatus = statusList[i] # <<<<<<<<<<<<<< + * + * aStatSev = [] + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4773, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_groupStatus = __pyx_t_12; + + /* "PyCafe.pyx":4772 + * p1.status = statusList[i] + * + * if groupStatus == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * groupStatus = statusList[i] + * + */ + } + + /* "PyCafe.pyx":4775 + * groupStatus = statusList[i] + * + * aStatSev = [] # <<<<<<<<<<<<<< + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4776 + * + * aStatSev = [] + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) # <<<<<<<<<<<<<< + * p1.alarmStatus = aStatSev[0] + * p1.alarmSeverity = aStatSev[1] + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAlarmStatusSeverity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4777 + * aStatSev = [] + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] # <<<<<<<<<<<<<< + * p1.alarmSeverity = aStatSev[1] + * + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_aStatSev, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4777, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmStatus = __pyx_t_12; + + /* "PyCafe.pyx":4778 + * aStatSev = self.getAlarmStatusSeverity(handleList[i]) + * p1.alarmStatus = aStatSev[0] + * p1.alarmSeverity = aStatSev[1] # <<<<<<<<<<<<<< + * + * p1.ts = self.getTimeStamp(handleList[i]) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_aStatSev, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4778, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmSeverity = __pyx_t_12; + + /* "PyCafe.pyx":4780 + * p1.alarmSeverity = aStatSev[1] + * + * p1.ts = self.getTimeStamp(handleList[i]) # <<<<<<<<<<<<<< + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) + * + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4780, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 4780, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->ts); + __Pyx_DECREF(__pyx_v_p1->ts); + __pyx_v_p1->ts = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4781 + * + * p1.ts = self.getTimeStamp(handleList[i]) + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) # <<<<<<<<<<<<<< + * + * localListToStruct.append(p1) + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStampAsDate); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 4781, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_p1->tsDate); + __Pyx_DECREF(__pyx_v_p1->tsDate); + __pyx_v_p1->tsDate = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4783 + * p1.tsDate = self.getTimeStampAsDate(handleList[i]) + * + * localListToStruct.append(p1) # <<<<<<<<<<<<<< + * + * cdef pvgroup pg + */ + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_localListToStruct, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 4783, __pyx_L1_error) + } + + /* "PyCafe.pyx":4787 + * cdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localListToStruct + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4789 + * pg = pvgroup() + * + * pg.pvdata = localListToStruct # <<<<<<<<<<<<<< + * # pg.pvdata[0].showMax(10) + * + */ + __Pyx_INCREF(__pyx_v_localListToStruct); + __Pyx_GIVEREF(__pyx_v_localListToStruct); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localListToStruct; + + /* "PyCafe.pyx":4792 + * # pg.pvdata[0].showMax(10) + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":4793 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":4794 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_groupStatus; + + /* "PyCafe.pyx":4795 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = groupStatus # pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * pg.showMax(1) + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":4797 + * pg.groupHandle = pvg.getGroupHandle() + * + * pg.showMax(1) # <<<<<<<<<<<<<< + * + * return pg + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pg), __pyx_n_s_showMax); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4799 + * pg.showMax(1) + * + * return pg # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":4714 + * ################################################################################## + * + * def getCompoundPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCompoundPVGroup(ghandleName, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("PyCafe.CyCafe.getCompoundPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF((PyObject *)__pyx_v_p1); + __Pyx_XDECREF(__pyx_v_localListToStruct); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XDECREF(__pyx_v_aStatSev); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4807 + * ################################################################################## + * + * def getStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303getStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303getStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_302getStrCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_302getStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getStrCache", 0); + + /* "PyCafe.pyx":4808 + * + * def getStrCache(self, handlePV): + * return self.getCache(handlePV, 'str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4807 + * ################################################################################## + * + * def getStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4812 + * + * ################################################################################## + * def getIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_305getIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_305getIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_304getIntCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_304getIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getIntCache", 0); + + /* "PyCafe.pyx":4813 + * ################################################################################## + * def getIntCache(self, handlePV): + * return self.getCache(handlePV, 'int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4812 + * + * ################################################################################## + * def getIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4817 + * + * ################################################################################## + * def getFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307getFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307getFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_306getFloatCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_306getFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getFloatCache", 0); + + /* "PyCafe.pyx":4818 + * ################################################################################## + * def getFloatCache(self, handlePV): + * return self.getCache(handlePV, 'float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4818, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4818, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4817 + * + * ################################################################################## + * def getFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV, 'float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4823 + * ################################################################################## + * + * def getCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCache") < 0)) __PYX_ERR(0, 4823, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4823, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4823, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_308getCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_308getCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + long __pyx_v_dtr; + PyObject *__pyx_v_status = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_dtcheck; + PyObject *__pyx_v_bVal = 0; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("getCache", 0); + + /* "PyCafe.pyx":4824 + * + * def getCache(self, handlePV, str dt='native'): + * cdef str _METHOD = "getCache(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCache_handlePV_str_dt_native); + __pyx_v__METHOD = __pyx_kp_u_getCache_handlePV_str_dt_native; + + /* "PyCafe.pyx":4826 + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4828 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4829 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4829, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4828 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4830 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4831 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4830 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4833 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 4833, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":4836 + * First input argument, should be of type if handle, else if PV") + * + * cdef long dtr = 0 # <<<<<<<<<<<<<< + * status = self.hh.getDataTypeNative(handle, dtr) + * + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":4837 + * + * cdef long dtr = 0 + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4839 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4840 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4841 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4842 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4842, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_8); + + /* "PyCafe.pyx":4841 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":4844 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * raise Exception( + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4844, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_8); + } + __pyx_L8:; + + /* "PyCafe.pyx":4840 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4845 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4847 + * if self._enable_exceptions: + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3, __pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":4846 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + * return None + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 4846, __pyx_L1_error) + + /* "PyCafe.pyx":4845 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":4848 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def getCache. Status = %d" % status) + * return None # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4839 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4850 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_1 = 1; + break; + default: + __pyx_t_1 = 0; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4851 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4852 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":4853 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4854 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":4853 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":4856 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4858 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4859 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4860 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4861 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4863 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 4858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4857 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4865 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 4865, __pyx_L1_error) + + /* "PyCafe.pyx":4856 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4866 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4851 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":4869 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4870 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":4869 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":4871 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4873 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4874 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4875 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4876 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4877 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return None + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 4873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4872 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4878 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return None + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 4878, __pyx_L1_error) + + /* "PyCafe.pyx":4871 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4879 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return None # <<<<<<<<<<<<<< + * + * cdef int dtcheck = dtr + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":4850 + * return None + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":4881 + * return None + * + * cdef int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":4882 + * + * cdef int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * cdef bytes bVal + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4882, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":4886 + * cdef bytes bVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":4887 + * + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * bVal = self.valStr + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheString(__pyx_v_handle, __pyx_v_self->valStr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4888 + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * bVal = self.valStr + * encoding = False + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4889 + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * bVal = self.valStr # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + */ + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_bVal = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4890 + * if status == ICAFE_NORMAL: + * bVal = self.valStr + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":4891 + * bVal = self.valStr + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('latin-1') + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4892 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "PyCafe.pyx":4893 + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + * strVal = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4893, __pyx_L17_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4893, __pyx_L17_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_strVal = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4894 + * try: + * strVal = (bVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4892 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L22_try_end; + __pyx_L17_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4895 + * strVal = (bVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L18_exception_handled; + } + goto __pyx_L19_except_error; + __pyx_L19_except_error:; + + /* "PyCafe.pyx":4892 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L18_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L22_try_end:; + } + + /* "PyCafe.pyx":4891 + * bVal = self.valStr + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":4897 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4898 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_9); + /*try:*/ { + + /* "PyCafe.pyx":4899 + * if not encoding: + * try: + * strVal = (bVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4899, __pyx_L24_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4899, __pyx_L24_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4900 + * try: + * strVal = (bVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4898 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L29_try_end; + __pyx_L24_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4901 + * strVal = (bVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L25_exception_handled; + } + goto __pyx_L26_except_error; + __pyx_L26_except_error:; + + /* "PyCafe.pyx":4898 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + goto __pyx_L1_error; + __pyx_L25_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); + __pyx_L29_try_end:; + } + + /* "PyCafe.pyx":4897 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":4903 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4904 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + /*try:*/ { + + /* "PyCafe.pyx":4905 + * if not encoding: + * try: + * strVal = (bVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 4905, __pyx_L31_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4905, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4906 + * try: + * strVal = (bVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":4904 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L36_try_end; + __pyx_L31_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4907 + * strVal = (bVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L32_exception_handled; + } + goto __pyx_L33_except_error; + __pyx_L33_except_error:; + + /* "PyCafe.pyx":4904 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + goto __pyx_L1_error; + __pyx_L32_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_L36_try_end:; + } + + /* "PyCafe.pyx":4903 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":4909 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.valStr + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4910 + * pass + * if not encoding: + * strVal = self.valStr # <<<<<<<<<<<<<< + * + * return strVal + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4909 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = self.valStr + * + */ + } + + /* "PyCafe.pyx":4912 + * strVal = self.valStr + * + * return strVal # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 4912, __pyx_L1_error) } + __Pyx_INCREF(__pyx_v_strVal); + __pyx_r = __pyx_v_strVal; + goto __pyx_L0; + + /* "PyCafe.pyx":4888 + * if dtcheck in [CAFE_STRING]: + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * bVal = self.valStr + * encoding = False + */ + } + + /* "PyCafe.pyx":4886 + * cdef bytes bVal + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":4915 + * + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":4916 + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheLong(__pyx_v_handle, __pyx_v_self->valInt)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4917 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4918 + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4917 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + } + + /* "PyCafe.pyx":4915 + * + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":4920 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":4921 + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valFloat + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheDouble(__pyx_v_handle, __pyx_v_self->valFloat)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4922 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4923 + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + * return self.valFloat # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_ENUM: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4922 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + } + + /* "PyCafe.pyx":4920 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status == ICAFE_NORMAL: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":4927 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4928 + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valStr + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheString(__pyx_v_handle, __pyx_v_self->valStr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4929 + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4929, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4929, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4930 + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4930, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4929 + * if self._c_cafe.isEnum(handle): + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":4927 + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * status = self._c_cafe.getCacheString(handle, self.valStr) + * if status == ICAFE_NORMAL: + */ + goto __pyx_L40; + } + + /* "PyCafe.pyx":4932 + * return self.valStr + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return self.valInt + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheLong(__pyx_v_handle, __pyx_v_self->valInt)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4933 + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4933, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4933, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4934 + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_dbr_long_t(__pyx_v_self->valInt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4933 + * else: + * status = self._c_cafe.getCacheLong(handle, self.valInt) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + } + } + __pyx_L40:; + + /* "PyCafe.pyx":4925 + * return self.valFloat + * + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + break; + default: + + /* "PyCafe.pyx":4937 + * + * else: + * status = self.hh.getStatus(handle) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4938 + * else: + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_status, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4938, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4938, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4939 + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") # <<<<<<<<<<<<<< + * print("Datatype unknown, returning value 0") + * return 0 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4940 + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4941 + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + * return 0 # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_0); + __pyx_r = __pyx_int_0; + goto __pyx_L0; + + /* "PyCafe.pyx":4938 + * else: + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") + */ + } + break; + } + + /* "PyCafe.pyx":4943 + * return 0 + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4944 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4945 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4946 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4946, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_8); + + /* "PyCafe.pyx":4945 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L46; + } + + /* "PyCafe.pyx":4948 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * if self._enable_exceptions: + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error) + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_8); + } + __pyx_L46:; + + /* "PyCafe.pyx":4944 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4950 + * self._c_cafe.printStatus(handle, status) + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4952 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4953 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4954 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_v_status) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4955 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4955, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 4952, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4951 + * + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4956 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 4956, __pyx_L1_error) + + /* "PyCafe.pyx":4950 + * self._c_cafe.printStatus(handle, status) + * + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":4943 + * return 0 + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4823 + * ################################################################################## + * + * def getCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getCache(handlePV, str dt='native')" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4962 + * ################################################################################## + * + * def getStrArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='str', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getStrArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStrArrayCache") < 0)) __PYX_ERR(0, 4962, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStrArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4962, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 4962, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_310getStrArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getStrArrayCache", 0); + + /* "PyCafe.pyx":4963 + * + * def getStrArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='str', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 4963, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 4963, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4962 + * ################################################################################## + * + * def getStrArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='str', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getStrArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4967 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='int', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getIntArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIntArrayCache") < 0)) __PYX_ERR(0, 4967, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getIntArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4967, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 4967, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_312getIntArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getIntArrayCache", 0); + + /* "PyCafe.pyx":4968 + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='int', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 4968, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 4968, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4967 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='int', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getIntArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4972 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='float', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getFloatArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_art,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFloatArrayCache") < 0)) __PYX_ERR(0, 4972, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_art = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getFloatArrayCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4972, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 4972, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_314getFloatArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getFloatArrayCache", 0); + + /* "PyCafe.pyx":4973 + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): + * return self.getArrayCache(handlePV, dt='float', art=art) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getArrayCache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_handlePV); + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 4973, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) __PYX_ERR(0, 4973, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4972 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='numpy'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='float', art=art) + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getFloatArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4977 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ################################################################################## + * # Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317getArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317getArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_v_art = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getArrayCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,&__pyx_n_s_art,0}; + PyObject* values[3] = {0,0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + values[2] = ((PyObject*)__pyx_n_u_numpy); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_art); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getArrayCache") < 0)) __PYX_ERR(0, 4977, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + __pyx_v_art = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getArrayCache", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4977, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 4977, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) __PYX_ERR(0, 4977, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_316getArrayCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt, __pyx_v_art); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316getArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt, PyObject *__pyx_v_art) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + dbr_char_t *__pyx_v_ui8val; + short *__pyx_v_i16val; + int *__pyx_v_ival; + double *__pyx_v_dval; + float *__pyx_v_fval; + dbr_string_t *__pyx_v_sval; + __Pyx_memviewslice __pyx_v_mvShort = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvInt = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvDouble = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_v_mvFloat = { 0, 0, { 0 }, { 0 }, { 0 } }; + long __pyx_v_dtr; + int __pyx_v_status; + unsigned int __pyx_v_i; + unsigned int __pyx_v_ij; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_nelemToRetrieveFromCache; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_locallist = NULL; + PyObject *__pyx_v_bVal = NULL; + int __pyx_v_encoding; + PyObject *__pyx_v_valStr = NULL; + CYTHON_UNUSED int __pyx_v_encoded; + PyObject *__pyx_v_mvInt8 = NULL; + PyObject *__pyx_v_mvUInt8 = NULL; + PyObject *__pyx_v_arrayArray = NULL; + PyObject *__pyx_v_ctypesArray = NULL; + PyObject *__pyx_v_mvIntNP = NULL; + PyObject *__pyx_v_mvFloatNP = NULL; + PyObject *__pyx_v_mvDoubleNP = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + unsigned int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_19; + size_t __pyx_t_20; + size_t __pyx_t_21; + size_t __pyx_t_22; + size_t __pyx_t_23; + size_t __pyx_t_24; + __Pyx_memviewslice __pyx_t_25 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_26; + size_t __pyx_t_27; + __Pyx_memviewslice __pyx_t_28 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_29; + size_t __pyx_t_30; + __Pyx_memviewslice __pyx_t_31 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_32; + size_t __pyx_t_33; + __Pyx_RefNannySetupContext("getArrayCache", 0); + + /* "PyCafe.pyx":4988 + * # allowing sharing of data buffers without copying + * + * cdef str _METHOD = "getArrayCache" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getArrayCache); + __pyx_v__METHOD = __pyx_n_u_getArrayCache; + + /* "PyCafe.pyx":4990 + * cdef str _METHOD = "getArrayCache" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4992 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4993 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4993, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4992 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4994 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4995 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4994 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4997 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * "First input argument should be of type if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__42, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_input_argument_should_be_o_4}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_input_argument_should_be_o_4); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_o_4); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_o_4); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4997, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 4997, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5013 + * # str [:,::1] mvStr + * cnp.ndarray arr + * long dtr = 0 # <<<<<<<<<<<<<< + * int status + * unsigned int i + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":5018 + * unsigned int ij + * + * status = self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":5020 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5021 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5022 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5023 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5022 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5025 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":5021 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5026 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5028 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5029 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5030 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5031 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5031, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 5028, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5027 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5032 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return [None] + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5032, __pyx_L1_error) + + /* "PyCafe.pyx":5026 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5034 + * raise _cafeException + * + * return [None] # <<<<<<<<<<<<<< + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_5, 0, Py_None); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5020 + * status = self.hh.getDataTypeNative(handle, dtr) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":5036 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + switch (__pyx_v_dtr) { + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + __pyx_t_1 = 1; + break; + default: + __pyx_t_1 = 0; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5037 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5038 + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":5039 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5040 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus( # <<<<<<<<<<<<<< + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":5039 + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + */ + } + + /* "PyCafe.pyx":5042 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5044 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5045 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5046 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), # <<<<<<<<<<<<<< + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5047 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=self.channelInfo.getCafeConnectionState(), + * _error_text=self.cs.code( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5049 + * _error_text=self.cs.code( + * self.channelInfo.getCafeConnectionState()), + * _error_info=self.cs.info( # <<<<<<<<<<<<<< + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 5044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5043 + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5043, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5051 + * _error_info=self.cs.info( + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5051, __pyx_L1_error) + + /* "PyCafe.pyx":5042 + * self._c_cafe.printStatus( + * handle, self.channelInfo.getCafeConnectionState()) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5052 + * self.channelInfo.getCafeConnectionState())) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * # Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_6, 0, Py_None); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5037 + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: + * if self._c_cafe.isChannelConnected(handle) is False: # <<<<<<<<<<<<<< + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + } + + /* "PyCafe.pyx":5055 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5056 + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":5055 + * + * # Likely to be superfluous + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":5057 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_2 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5059 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5060 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_t_5) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5061 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5062 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5062, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5063 + * _error_code=ICAFE_TYPENOTCONN, + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 5059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5058 + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5064 + * _error_text=self.cs.code(ICAFE_TYPENOTCONN), + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5064, __pyx_L1_error) + + /* "PyCafe.pyx":5057 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatus(handle, ICAFE_TYPENOTCONN) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5065 + * _error_info=self.cs.info(ICAFE_TYPENOTCONN)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_5, 0, Py_None); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5036 + * return [None] + * + * elif dtr in [CAFE_NO_ACCESS, CAFE_TYPENOTCONN]: # <<<<<<<<<<<<<< + * if self._c_cafe.isChannelConnected(handle) is False: + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + */ + } + __pyx_L6:; + + /* "PyCafe.pyx":5067 + * return [None] + * + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck = dtr + */ + __pyx_v_nelemToRetrieveFromCache = __pyx_v_self->hh.getNelemToRetrieveFromCache(__pyx_v_handle); + + /* "PyCafe.pyx":5069 + * cdef unsigned int nelemToRetrieveFromCache = self.hh.getNelemToRetrieveFromCache(handle) + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":5070 + * + * cdef unsigned int dtcheck = dtr + * dtcheck = getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * # The element type of a typed memoryview may be a numeric scalar type (int, float) + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5070, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":5075 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + case CAFE_ENUM: + + /* "PyCafe.pyx":5076 + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) + */ + __pyx_v_sval = ((char (*)[40])malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":5078 + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) # <<<<<<<<<<<<<< + * + * locallist = [] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheDbrStringArray(__pyx_v_handle, __pyx_v_sval); + + /* "PyCafe.pyx":5080 + * status = self._c_cafe.getCacheDbrStringArray(handle, sval) + * + * locallist = [] # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_locallist = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5082 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * for i in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5084 + * if status == ICAFE_NORMAL: + * + * for i in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * + * bVal = ( sval[i]) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":5086 + * for i in range(0, nelemToRetrieveFromCache): + * + * bVal = ( sval[i]) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + */ + __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string(((std::string)(__pyx_v_sval[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_bVal, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5087 + * + * bVal = ( sval[i]) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":5088 + * bVal = ( sval[i]) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5089 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":5090 + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: + * valStr = (bVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 5090, __pyx_L19_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5090, __pyx_L19_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5091 + * try: + * valStr = (bVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":5089 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L26_try_end; + __pyx_L19_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5092 + * valStr = (bVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L20_exception_handled; + } + goto __pyx_L21_except_error; + __pyx_L21_except_error:; + + /* "PyCafe.pyx":5089 + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L20_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L26_try_end:; + } + + /* "PyCafe.pyx":5088 + * bVal = ( sval[i]) + * encoding = False + * if '.EGU' in self._c_cafe.getPVFromHandle(handle): # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":5095 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5096 + * + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoded = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":5097 + * if not encoding: + * try: + * valStr = (bVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoded = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 5097, __pyx_L28_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5097, __pyx_L28_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5098 + * try: + * valStr = (bVal).decode('utf-8') + * encoded = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoded = 1; + + /* "PyCafe.pyx":5096 + * + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoded = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L35_try_end; + __pyx_L28_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5099 + * valStr = (bVal).decode('utf-8') + * encoded = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L29_exception_handled; + } + goto __pyx_L30_except_error; + __pyx_L30_except_error:; + + /* "PyCafe.pyx":5096 + * + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-8') + * encoded = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L29_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L35_try_end:; + } + + /* "PyCafe.pyx":5095 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":5101 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5102 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoded = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":5103 + * if not encoding: + * try: + * valStr = (bVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoded = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 5103, __pyx_L37_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5103, __pyx_L37_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5104 + * try: + * valStr = (bVal).decode('utf-16') + * encoded = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoded = 1; + + /* "PyCafe.pyx":5102 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoded = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L44_try_end; + __pyx_L37_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5105 + * valStr = (bVal).decode('utf-16') + * encoded = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_8) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L38_exception_handled; + } + goto __pyx_L39_except_error; + __pyx_L39_except_error:; + + /* "PyCafe.pyx":5102 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valStr = (bVal).decode('utf-16') + * encoded = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L38_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L44_try_end:; + } + + /* "PyCafe.pyx":5101 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valStr = (bVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":5108 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * valStr = sval[i] + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5109 + * + * if not encoding: + * valStr = sval[i] # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_valStr, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5108 + * pass + * + * if not encoding: # <<<<<<<<<<<<<< + * valStr = sval[i] + * + */ + } + + /* "PyCafe.pyx":5112 + * + * + * locallist.append(valStr) #sval[i]) # <<<<<<<<<<<<<< + * + * free(sval) + */ + if (unlikely(!__pyx_v_valStr)) { __Pyx_RaiseUnboundLocalError("valStr"); __PYX_ERR(0, 5112, __pyx_L1_error) } + __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_locallist, __pyx_v_valStr); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5112, __pyx_L1_error) + } + + /* "PyCafe.pyx":5114 + * locallist.append(valStr) #sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * return locallist + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":5115 + * + * free(sval) + * return locallist # <<<<<<<<<<<<<< + * + * ''' Not for strings + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_locallist); + __pyx_r = __pyx_v_locallist; + goto __pyx_L0; + + /* "PyCafe.pyx":5082 + * locallist = [] + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * for i in range(0, nelemToRetrieveFromCache): + */ + } + + /* "PyCafe.pyx":5075 + * # It may be a ctypedef alias, or it may be a structured type declared with e.g. cdef struct + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: # <<<<<<<<<<<<<< + * sval = malloc(nelemToRetrieveFromCache * sizeof(dbr_string_t)) + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":5173 + * elif dtcheck in [CAFE_CHAR]: + * + * ui8val = malloc(nelemToRetrieveFromCache * sizeof(np.uint8)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheCharArray(handle, ui8val) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ui8val = ((dbr_char_t *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(__pyx_t_6))))); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5175 + * ui8val = malloc(nelemToRetrieveFromCache * sizeof(np.uint8)) + * + * status = self._c_cafe.getCacheCharArray(handle, ui8val) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheCharArray(__pyx_v_handle, __pyx_v_ui8val); + + /* "PyCafe.pyx":5177 + * status = self._c_cafe.getCacheCharArray(handle, ui8val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5180 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5180, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L48_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5182 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L54_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5182, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L54_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5183 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5184 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5183 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5184 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 5184, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5184, __pyx_L1_error) + + /* "PyCafe.pyx":5183 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_17, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5185 + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5186 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return np.array(mvShort) + */ + __pyx_t_19 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5186, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_19)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5187 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return np.array(mvShort) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5188 + * mvShort[ij] = ui8val[ij] + * free(ui8val) + * return np.array(mvShort) # <<<<<<<<<<<<<< + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_17 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_17; + __pyx_t_17 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5182 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + goto __pyx_L53; + } + + /* "PyCafe.pyx":5190 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L60_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5190, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L60_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5191 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "PyCafe.pyx":5192 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = ui8val[ij] + */ + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + + /* "PyCafe.pyx":5191 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_17); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_17); + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5192 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = ui8val[ij] + */ + __pyx_t_17 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 5192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5192, __pyx_L1_error) + + /* "PyCafe.pyx":5191 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, __pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_v_mvInt8 = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5193 + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt8[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5194 + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return np.array(mvInt8) + */ + __pyx_t_7 = __Pyx_PyInt_From_npy_int8(((__pyx_t_5numpy_int8_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvInt8, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5195 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return np.array(mvInt8) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5196 + * mvInt8[ij] = ui8val[ij] + * free(ui8val) + * return np.array(mvInt8) # <<<<<<<<<<<<<< + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_17, __pyx_v_mvInt8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_mvInt8); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5190 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + */ + goto __pyx_L53; + } + + /* "PyCafe.pyx":5198 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5198, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5198, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L68_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5198, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L68_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5199 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5200 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":5199 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5200 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 5200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5200, __pyx_L1_error) + + /* "PyCafe.pyx":5199 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvUInt8 = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5201 + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5202 + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return np.array(mvUInt8) + */ + __pyx_t_5 = __Pyx_PyInt_From_npy_uint8(((__pyx_t_5numpy_uint8_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvUInt8, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5203 + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return np.array(mvUInt8) + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5204 + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) + * return np.array(mvUInt8) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_17); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_17, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_7, __pyx_v_mvUInt8) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_v_mvUInt8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5198 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + */ + goto __pyx_L53; + } + + /* "PyCafe.pyx":5208 + * else: + * + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5209 + * + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":5208 + * else: + * + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5209 + * + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 5209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5209, __pyx_L1_error) + + /* "PyCafe.pyx":5208 + * else: + * + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvUInt8 = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":5211 + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvUInt8[ij] = ui8val[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5212 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * + * free(ui8val) + */ + __pyx_t_9 = __Pyx_PyInt_From_npy_uint8(((__pyx_t_5numpy_uint8_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvUInt8, __pyx_v_ij, __pyx_t_9, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5212, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":5214 + * mvUInt8[ij] = ui8val[ij] + * + * free(ui8val) # <<<<<<<<<<<<<< + * + * return np.array(mvUInt8) + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5216 + * free(ui8val) + * + * return np.array(mvUInt8) # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_9 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_mvUInt8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mvUInt8); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L53:; + + /* "PyCafe.pyx":5180 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + */ + goto __pyx_L47; + } + + /* "PyCafe.pyx":5218 + * return np.array(mvUInt8) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5218, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L75_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5218, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L75_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5218, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L75_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5219 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":5220 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":5219 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":5220 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 5220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5220, __pyx_L1_error) + + /* "PyCafe.pyx":5219 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5222 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5223 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * + */ + __pyx_t_20 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_20 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5223, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_20)) )) = ((short)(__pyx_v_ui8val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5224 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5226 + * free(ui8val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5218 + * return np.array(mvUInt8) + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + goto __pyx_L47; + } + + /* "PyCafe.pyx":5228 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5228, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L80_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5228, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L80_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5229 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( ui8val[ij]) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_arrayArray = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5230 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append( ui8val[ij]) + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5231 + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( ui8val[ij]) # <<<<<<<<<<<<<< + * free(ui8val) + * return arrayArray + */ + __pyx_t_6 = __Pyx_PyInt_From_dbr_char_t(((dbr_char_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_6); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":5232 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( ui8val[ij]) + * free(ui8val) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5233 + * arrayArray.append( ui8val[ij]) + * free(ui8val) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5228 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L47; + } + + /* "PyCafe.pyx":5235 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5235, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L84_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5235, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L84_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5236 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ui8val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_ctypesArray = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5237 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5238 + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * return ctypesArray + */ + __pyx_t_6 = __Pyx_PyInt_From_short(((short)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5238, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":5239 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5240 + * ctypesArray[ij] = ui8val[ij] + * free(ui8val) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5235 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L47; + } + + /* "PyCafe.pyx":5243 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":5244 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":5243 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5245 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvUInt8 = np.empty( + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5246 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5247 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5248 + * print("Returning memoryview") + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":5247 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5248 + * print("Returning memoryview") + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 5248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5248, __pyx_L1_error) + + /* "PyCafe.pyx":5247 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvUInt8 = __pyx_t_17; + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5249 + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5250 + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] # <<<<<<<<<<<<<< + * free(ui8val) + * + */ + __pyx_t_17 = __Pyx_PyInt_From_dbr_char_t(((dbr_char_t)(__pyx_v_ui8val[__pyx_v_ij]))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvUInt8, __pyx_v_ij, __pyx_t_17, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + + /* "PyCafe.pyx":5251 + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = ui8val[ij] + * free(ui8val) # <<<<<<<<<<<<<< + * + * return mvUInt8 + */ + free(__pyx_v_ui8val); + + /* "PyCafe.pyx":5253 + * free(ui8val) + * + * return mvUInt8 # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvUInt8); + __pyx_r = __pyx_v_mvUInt8; + goto __pyx_L0; + } + __pyx_L47:; + + /* "PyCafe.pyx":5177 + * status = self._c_cafe.getCacheCharArray(handle, ui8val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":5171 + * return mvStr + * ''' + * elif dtcheck in [CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * ui8val = malloc(nelemToRetrieveFromCache * sizeof(np.uint8)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":5259 + * elif dtcheck in [CAFE_SHORT]: + * + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheShortArray(handle, i16val) + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_int16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_v_i16val = ((short *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(__pyx_t_7))))); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5261 + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + * + * status = self._c_cafe.getCacheShortArray(handle, i16val) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheShortArray(__pyx_v_handle, __pyx_v_i16val); + + /* "PyCafe.pyx":5263 + * status = self._c_cafe.getCacheShortArray(handle, i16val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5266 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L92_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5266, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L92_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5268 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_short, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L98_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_int16, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L98_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_short, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L98_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_int16, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5268, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L98_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5269 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5270 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":5269 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5270 + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5270, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 5270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5270, __pyx_L1_error) + + /* "PyCafe.pyx":5269 + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5269, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5271 + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5272 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvShort) + */ + __pyx_t_21 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_21 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5272, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_21)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5273 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvShort) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5274 + * mvShort[ij] = i16val[ij] + * free(i16val) + * return np.array(mvShort) # <<<<<<<<<<<<<< + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_5 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_17, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5268 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + goto __pyx_L97; + } + + /* "PyCafe.pyx":5276 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_int8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_bool, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_bool, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_byte, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L104_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_int8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5276, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L104_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5277 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5278 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = i16val[ij] + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":5277 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5278 + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = i16val[ij] + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 5278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5278, __pyx_L1_error) + + /* "PyCafe.pyx":5277 + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: + * mvInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvInt8 = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5279 + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5280 + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvInt8) + */ + __pyx_t_6 = __Pyx_PyInt_From_npy_int8(((__pyx_t_5numpy_int8_t)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvInt8, __pyx_v_ij, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5280, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":5281 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5282 + * mvInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvInt8) # <<<<<<<<<<<<<< + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_mvInt8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_mvInt8); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5276 + * return np.array(mvShort) + * + * elif dt in ['np.int8', 'np.bool_', 'np.byte', 'bool', 'byte', 'int8']: # <<<<<<<<<<<<<< + * mvInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.int8, order='C') + */ + goto __pyx_L97; + } + + /* "PyCafe.pyx":5284 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_16 = __pyx_v_dt; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5284, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L112_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_uint8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5284, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L112_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_uint8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5284, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L112_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5285 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5286 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5285 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5286 + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = i16val[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 5286, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5286, __pyx_L1_error) + + /* "PyCafe.pyx":5285 + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: + * mvUInt8 = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvUInt8 = __pyx_t_17; + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5287 + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvUInt8[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5288 + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return np.array(mvUInt8) + */ + __pyx_t_17 = __Pyx_PyInt_From_npy_uint8(((__pyx_t_5numpy_uint8_t)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvUInt8, __pyx_v_ij, __pyx_t_17, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + + /* "PyCafe.pyx":5289 + * for ij in range(0, nelemToRetrieveFromCache): + * mvUInt8[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return np.array(mvUInt8) + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5290 + * mvUInt8[ij] = i16val[ij] + * free(i16val) + * return np.array(mvUInt8) # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_17 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_mvUInt8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_mvUInt8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_17; + __pyx_t_17 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5284 + * return np.array(mvInt8) + * + * elif dt in ['uchar', 'np.uint8', 'uint8']: # <<<<<<<<<<<<<< + * mvUInt8 = np.empty( + * nelemToRetrieveFromCache, dtype=np.uint8, order='C') + */ + goto __pyx_L97; + } + + /* "PyCafe.pyx":5294 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "PyCafe.pyx":5295 + * + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + + /* "PyCafe.pyx":5294 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_17); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_17); + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5295 + * + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 5295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5295, __pyx_L1_error) + + /* "PyCafe.pyx":5294 + * else: + * + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5294, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5294, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5297 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5298 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * + * free(i16val) + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5298, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_22)) )) = ((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5300 + * mvShort[ij] = i16val[ij] + * + * free(i16val) # <<<<<<<<<<<<<< + * + * return np.array(mvShort) # arr + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5302 + * free(i16val) + * + * return np.array(mvShort) # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_9 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_17); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L97:; + + /* "PyCafe.pyx":5266 + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * if dt in ['np.short', 'np.int16', 'short', 'int16']: + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":5304 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5304, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L119_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5304, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L119_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5304, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L119_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5305 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":5306 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":5305 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":5306 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 5306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5306, __pyx_L1_error) + + /* "PyCafe.pyx":5305 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5308 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5309 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_23 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5309, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_23)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5310 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5312 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5304 + * return np.array(mvShort) # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":5314 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5314, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L124_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5314, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L124_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5315 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5316 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append( < short > i16val[ij]) + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5317 + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) # <<<<<<<<<<<<<< + * free(i16val) + * return arrayArray + */ + __pyx_t_7 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5318 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < short > i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5319 + * arrayArray.append( < short > i16val[ij]) + * free(i16val) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5314 + * return mvShort + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":5321 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5321, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L128_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5321, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L128_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5322 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_17, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5323 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5324 + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return ctypesArray + */ + __pyx_t_7 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5324, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5325 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5326 + * ctypesArray[ij] = i16val[ij] + * free(i16val) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5321 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L91; + } + + /* "PyCafe.pyx":5329 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":5330 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":5329 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5331 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvShort = np.empty( + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5332 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5333 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5334 + * print("Returning memoryview") + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5333 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5334 + * print("Returning memoryview") + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_int16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 5334, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5334, __pyx_L1_error) + + /* "PyCafe.pyx":5333 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvShort = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 5333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvShort = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":5335 + * mvShort = np.empty( + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvShort[ij] = i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5336 + * nelemToRetrieveFromCache, dtype=np.int16, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_24 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_24 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5336, __pyx_L1_error) + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_24)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5337 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij] = i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":5339 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvShort, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int16_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int16_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L91:; + + /* "PyCafe.pyx":5263 + * status = self._c_cafe.getCacheShortArray(handle, i16val) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * # np.empty preferred, else mvInt does not get correct value for first couple of array elements + * + */ + } + + /* "PyCafe.pyx":5257 + * + * + * elif dtcheck in [CAFE_SHORT]: # <<<<<<<<<<<<<< + * + * i16val = malloc(nelemToRetrieveFromCache * sizeof(np.int16)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":5346 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheLongArray(handle, ival) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ival = ((int *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(__pyx_t_6))))); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5348 + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) + * + * status = self._c_cafe.getCacheLongArray(handle, ival) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheLongArray(__pyx_v_handle, __pyx_v_ival); + + /* "PyCafe.pyx":5350 + * status = self._c_cafe.getCacheLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5352 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L136_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L136_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L136_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L136_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5352, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L136_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5354 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5355 + * + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5354 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5355 + * + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 5355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5355, __pyx_L1_error) + + /* "PyCafe.pyx":5354 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvIntNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvIntNP = __pyx_t_17; + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5356 + * mvIntNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvIntNP[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5357 + * nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvIntNP # arr + */ + __pyx_t_17 = __Pyx_PyInt_From_npy_int32(((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvIntNP, __pyx_v_ij, __pyx_t_17, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5357, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + + /* "PyCafe.pyx":5358 + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvIntNP # arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":5359 + * mvIntNP[ij] = ival[ij] + * free(ival) + * return mvIntNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvIntNP); + __pyx_r = __pyx_v_mvIntNP; + goto __pyx_L0; + + /* "PyCafe.pyx":5352 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty( + */ + goto __pyx_L135; + } + + /* "PyCafe.pyx":5361 + * return mvIntNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5361, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L143_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5361, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L143_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5361, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L143_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5362 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_17); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_17); + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5363 + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + */ + __pyx_t_17 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 5363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5363, __pyx_L1_error) + + /* "PyCafe.pyx":5362 + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_25 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_25.memview)) __PYX_ERR(0, 5362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvInt = __pyx_t_25; + __pyx_t_25.memview = NULL; + __pyx_t_25.data = NULL; + + /* "PyCafe.pyx":5364 + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5365 + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_26 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_26 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5365, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_26)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5366 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":5367 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5361 + * return mvIntNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + goto __pyx_L135; + } + + /* "PyCafe.pyx":5369 + * return mvInt + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5369, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L148_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5369, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L148_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5370 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5371 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append( < int > ival[ij]) + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5372 + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) # <<<<<<<<<<<<<< + * free(ival) + * return arrayArray + */ + __pyx_t_7 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5373 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append( < int > ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":5374 + * arrayArray.append( < int > ival[ij]) + * free(ival) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', 'ctype']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5369 + * return mvInt + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L135; + } + + /* "PyCafe.pyx":5376 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5376, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L152_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5376, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L152_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5377 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5378 + * elif art in ['ctypes', 'ctype']: + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5379 + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return ctypesArray + */ + __pyx_t_7 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5379, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5380 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":5381 + * ctypesArray[ij] = ival[ij] + * free(ival) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5376 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L135; + } + + /* "PyCafe.pyx":5384 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":5385 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":5384 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5386 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5387 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5388 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5389 + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_C) < 0) __PYX_ERR(0, 5389, __pyx_L1_error) + + /* "PyCafe.pyx":5388 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvInt = np.empty(nelemToRetrieveFromCache, # <<<<<<<<<<<<<< + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_17, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_25 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_25.memview)) __PYX_ERR(0, 5388, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvInt = __pyx_t_25; + __pyx_t_25.memview = NULL; + __pyx_t_25.data = NULL; + + /* "PyCafe.pyx":5390 + * mvInt = np.empty(nelemToRetrieveFromCache, + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvInt[ij] = ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5391 + * dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvInt + */ + __pyx_t_27 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_27 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5391, __pyx_L1_error) + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_27)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5392 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij] = ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":5393 + * mvInt[ij] = ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvInt, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L135:; + + /* "PyCafe.pyx":5350 + * status = self._c_cafe.getCacheLongArray(handle, ival) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":5344 + * + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc(nelemToRetrieveFromCache * sizeof(np.int32)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":5397 + * elif dtcheck in [CAFE_FLOAT]: + * + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCacheFloatArray(handle, fval) + */ + __pyx_v_fval = ((float *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(float))))); + + /* "PyCafe.pyx":5399 + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) + * + * status = self._c_cafe.getCacheFloatArray(handle, fval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheFloatArray(__pyx_v_handle, __pyx_v_fval); + + /* "PyCafe.pyx":5401 + * status = self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5403 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5403, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L160_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5403, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L160_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5403, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L160_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5403, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L160_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5403, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L160_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5405 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5406 + * + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":5405 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5406 + * + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 5406, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":5405 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvFloatNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvFloatNP = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":5407 + * mvFloatNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5408 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_9 = PyFloat_FromDouble(((float)(__pyx_v_fval[__pyx_v_ij]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvFloatNP, __pyx_v_ij, __pyx_t_9, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5408, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":5410 + * mvFloatNP[ij] = fval[ij] # pvd.getAsFloat(ij) + * + * free(fval) # <<<<<<<<<<<<<< + * + * return mvFloatNP # arr + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":5412 + * free(fval) + * + * return mvFloatNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvFloatNP); + __pyx_r = __pyx_v_mvFloatNP; + goto __pyx_L0; + + /* "PyCafe.pyx":5403 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty( + */ + goto __pyx_L159; + } + + /* "PyCafe.pyx":5414 + * return mvFloatNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L167_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L167_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5414, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L167_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5417 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":5418 + * # Method A to return memory view + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":5417 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":5418 + * # Method A to return memory view + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 5418, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5417 + * + * # Method A to return memory view + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_17, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(0, 5417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvFloat = __pyx_t_28; + __pyx_t_28.memview = NULL; + __pyx_t_28.data = NULL; + + /* "PyCafe.pyx":5419 + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5420 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_29 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_29 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5420, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_29)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5422 + * mvFloat[ij] = fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":5423 + * + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * # Method B to return memory view + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5414 + * return mvFloatNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L159; + } + + /* "PyCafe.pyx":5437 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5437, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L172_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5437, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L172_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5438 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5438, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5439 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(fval[ij]) + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5440 + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) # <<<<<<<<<<<<<< + * free(fval) + * return arrayArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5440, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5441 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":5442 + * arrayArray.append(fval[ij]) + * free(fval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5437 + * ''' + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L159; + } + + /* "PyCafe.pyx":5444 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5444, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L176_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5444, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L176_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5445 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_c_float); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = PyNumber_Multiply(__pyx_t_17, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5446 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5447 + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return ctypesArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5448 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":5449 + * ctypesArray[ij] = fval[ij] + * free(fval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5444 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L159; + } + + /* "PyCafe.pyx":5452 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":5453 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":5452 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5454 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvFloat = np.empty( + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5455 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5456 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5457 + * print("Returning memoryview") + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":5456 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5457 + * print("Returning memoryview") + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 5457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5456 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvFloat = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(0, 5456, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvFloat = __pyx_t_28; + __pyx_t_28.memview = NULL; + __pyx_t_28.data = NULL; + + /* "PyCafe.pyx":5458 + * mvFloat = np.empty( + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvFloat[ij] = fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5459 + * nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return mvFloat + */ + __pyx_t_30 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_30 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5459, __pyx_L1_error) + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_30)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5460 + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij] = fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":5461 + * mvFloat[ij] = fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_mvFloat, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L159:; + + /* "PyCafe.pyx":5401 + * status = self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":5395 + * return mvInt + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc(nelemToRetrieveFromCache * sizeof(float)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":5465 + * elif dtcheck in [CAFE_DOUBLE]: + * + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getDoubleArray(handle, dval) + */ + __pyx_v_dval = ((double *)malloc((__pyx_v_nelemToRetrieveFromCache * (sizeof(double))))); + + /* "PyCafe.pyx":5467 + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) + * + * status = self._c_cafe.getDoubleArray(handle, dval) # <<<<<<<<<<<<<< + * + * if status == ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDoubleArray(__pyx_v_handle, __pyx_v_dval); + + /* "PyCafe.pyx":5469 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + __pyx_t_3 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":5471 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvDoubleNP = np.empty( + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5471, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L184_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5471, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L184_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5471, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L184_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_np, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5471, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L184_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_np_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5471, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L184_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5473 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5474 + * + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5473 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5474 + * + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_17) < 0) __PYX_ERR(0, 5474, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "PyCafe.pyx":5473 + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + * + * mvDoubleNP = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvDoubleNP = __pyx_t_17; + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5475 + * mvDoubleNP = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDoubleNP[ij] = dval[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5476 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij] = dval[ij] # <<<<<<<<<<<<<< + * + * free(dval) + */ + __pyx_t_17 = PyFloat_FromDouble(((double)(__pyx_v_dval[__pyx_v_ij]))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvDoubleNP, __pyx_v_ij, __pyx_t_17, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } + + /* "PyCafe.pyx":5478 + * mvDoubleNP[ij] = dval[ij] + * + * free(dval) # <<<<<<<<<<<<<< + * return mvDoubleNP # arr + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":5479 + * + * free(dval) + * return mvDoubleNP # arr # <<<<<<<<<<<<<< + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvDoubleNP); + __pyx_r = __pyx_v_mvDoubleNP; + goto __pyx_L0; + + /* "PyCafe.pyx":5471 + * if status == ICAFE_NORMAL: + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: # <<<<<<<<<<<<<< + * + * mvDoubleNP = np.empty( + */ + goto __pyx_L183; + } + + /* "PyCafe.pyx":5481 + * return mvDoubleNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5481, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L191_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5481, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L191_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5481, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L191_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5484 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + + /* "PyCafe.pyx":5485 + * # Method A to return memory view + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + + /* "PyCafe.pyx":5484 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_17); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_17); + __pyx_t_17 = 0; + + /* "PyCafe.pyx":5485 + * # Method A to return memory view + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 5485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":5484 + * + * # Method A to return memory view + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 5484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvDouble = __pyx_t_31; + __pyx_t_31.memview = NULL; + __pyx_t_31.data = NULL; + + /* "PyCafe.pyx":5486 + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5487 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_32 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_32 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5487, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_32)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5488 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":5489 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * elif art in ['array', 'array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5481 + * return mvDoubleNP # arr + * + * elif art in ['memoryview', 'mv', 'memoryviewslice']: # <<<<<<<<<<<<<< + * + * # Method A to return memory view + */ + goto __pyx_L183; + } + + /* "PyCafe.pyx":5491 + * return mvDouble + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5491, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L196_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5491, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L196_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5492 + * + * elif art in ['array', 'array.array']: + * arrayArray = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5493 + * elif art in ['array', 'array.array']: + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(dval[ij]) + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5494 + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) # <<<<<<<<<<<<<< + * free(dval) + * return arrayArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 5494, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5495 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":5496 + * arrayArray.append(dval[ij]) + * free(dval) + * return arrayArray # <<<<<<<<<<<<<< + * + * elif art in ['ctypes', "ctype"]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_arrayArray); + __pyx_r = __pyx_v_arrayArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5491 + * return mvDouble + * + * elif art in ['array', 'array.array']: # <<<<<<<<<<<<<< + * arrayArray = array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L183; + } + + /* "PyCafe.pyx":5498 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_16 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5498, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L200_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_16, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5498, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L200_bool_binop_done:; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5499 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] + */ + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_c_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_17 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":5500 + * elif art in ['ctypes', "ctype"]: + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * ctypesArray[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5501 + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return ctypesArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) __PYX_ERR(0, 5501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":5502 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":5503 + * ctypesArray[ij] = dval[ij] + * free(dval) + * return ctypesArray # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ctypesArray); + __pyx_r = __pyx_v_ctypesArray; + goto __pyx_L0; + + /* "PyCafe.pyx":5498 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray = (ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L183; + } + + /* "PyCafe.pyx":5506 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + /*else*/ { + + /* "PyCafe.pyx":5507 + * else: + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_GIVEREF(__pyx_kp_u_Unknow_array_type_in_user_reques); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Unknow_array_type_in_user_reques); + __Pyx_INCREF(__pyx_v_art); + __Pyx_GIVEREF(__pyx_v_art); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_art); + __Pyx_INCREF(__pyx_kp_u_Possible_types_are); + __Pyx_GIVEREF(__pyx_kp_u_Possible_types_are); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_Possible_types_are); + + /* "PyCafe.pyx":5506 + * + * else: + * print("Unknow array type in user request for art='", # <<<<<<<<<<<<<< + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5508 + * print("Unknow array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvDouble = np.empty( + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5509 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5510 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5511 + * print("Returning memoryview") + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5510 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5511 + * print("Returning memoryview") + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 5511, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5510 + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + * mvDouble = np.empty( # <<<<<<<<<<<<<< + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_17, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 5510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvDouble = __pyx_t_31; + __pyx_t_31.memview = NULL; + __pyx_t_31.data = NULL; + + /* "PyCafe.pyx":5512 + * mvDouble = np.empty( + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDouble[ij] = dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_ij = __pyx_t_11; + + /* "PyCafe.pyx":5513 + * nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_33 = __pyx_v_ij; + __pyx_t_8 = -1; + if (unlikely(__pyx_t_33 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_8 = 0; + if (unlikely(__pyx_t_8 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_8); + __PYX_ERR(0, 5513, __pyx_L1_error) + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_33)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":5514 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij] = dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":5515 + * mvDouble[ij] = dval[ij] + * free(dval) + * return mvDouble # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_mvDouble, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L183:; + + /* "PyCafe.pyx":5469 + * status = self._c_cafe.getDoubleArray(handle, dval) + * + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy', 'ndarray', 'numpy.ndarray', 'np', 'np.ndarray']: + */ + } + + /* "PyCafe.pyx":5463 + * return mvFloat + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * dval = malloc(nelemToRetrieveFromCache * sizeof(double)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":5517 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5518 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5519 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5520 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5519 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L208; + } + + /* "PyCafe.pyx":5522 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L208:; + + /* "PyCafe.pyx":5518 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5523 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5525 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5526 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, + * _error_text=self.cs.code(status), + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5527 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5528 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, + * _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5529 + * _error_code=status, + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return [None] + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 5525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5524 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5530 + * _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return [None] + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5530, __pyx_L1_error) + + /* "PyCafe.pyx":5523 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5531 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return [None] # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyList_SET_ITEM(__pyx_t_6, 0, Py_None); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5517 + * return mvDouble + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4977 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ################################################################################## + * # Typed Memoryviews from K.W. Smith + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_25, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_28, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1); + __Pyx_AddTraceback("PyCafe.CyCafe.getArrayCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvShort, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvInt, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvDouble, 1); + __PYX_XDEC_MEMVIEW(&__pyx_v_mvFloat, 1); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_locallist); + __Pyx_XDECREF(__pyx_v_bVal); + __Pyx_XDECREF(__pyx_v_valStr); + __Pyx_XDECREF(__pyx_v_mvInt8); + __Pyx_XDECREF(__pyx_v_mvUInt8); + __Pyx_XDECREF(__pyx_v_arrayArray); + __Pyx_XDECREF(__pyx_v_ctypesArray); + __Pyx_XDECREF(__pyx_v_mvIntNP); + __Pyx_XDECREF(__pyx_v_mvFloatNP); + __Pyx_XDECREF(__pyx_v_mvDoubleNP); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5539 + * ################################################################################## + * + * def getPVStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVStrCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_318getPVStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVStrCache", 0); + + /* "PyCafe.pyx":5540 + * + * def getPVStrCache(self, handlePV): + * return self.getPVCache(handlePV, 'str') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5539 + * ################################################################################## + * + * def getPVStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'str') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVStrCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5544 + * + * ################################################################################## + * def getPVIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVIntCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_320getPVIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVIntCache", 0); + + /* "PyCafe.pyx":5545 + * ################################################################################## + * def getPVIntCache(self, handlePV): + * return self.getPVCache(handlePV, 'int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5545, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5545, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5544 + * + * ################################################################################## + * def getPVIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'int') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVIntCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5549 + * + * ################################################################################## + * def getPVFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVFloatCache (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_322getPVFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getPVFloatCache", 0); + + /* "PyCafe.pyx":5550 + * ################################################################################## + * def getPVFloatCache(self, handlePV): + * return self.getPVCache(handlePV, 'float') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handlePV, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5549 + * + * ################################################################################## + * def getPVFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV, 'float') + * ################################################################################## + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVFloatCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5554 + * + * ################################################################################## + * def getPVCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_325getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_325getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVCache") < 0)) __PYX_ERR(0, 5554, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5554, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 5554, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_324getPVCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_324getPVCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVDataHolder __pyx_v_pvd; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvdata *__pyx_v_pvd_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_8; + __Pyx_RefNannySetupContext("getPVCache", 0); + + /* "PyCafe.pyx":5557 + * ################################################################################## + * + * cdef str _METHOD = "getPVCache(handlePV, str dt='native'" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getPVCache_handlePV_str_dt_nativ); + __pyx_v__METHOD = __pyx_kp_u_getPVCache_handlePV_str_dt_nativ; + + /* "PyCafe.pyx":5559 + * cdef str _METHOD = "getPVCache(handlePV, str dt='native'" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5561 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5562 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5562, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5561 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5563 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5564 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5564, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5563 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5566 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 5566, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5571 + * cdef PVDataHolder pvd + * + * pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) # <<<<<<<<<<<<<< + * + * status = self._c_cafe.getCache(handle, pvd) + */ + (void)(__pyx_v_pvd.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCache(__pyx_v_handle))); + + /* "PyCafe.pyx":5573 + * pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) + * + * status = self._c_cafe.getCache(handle, pvd) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCache(__pyx_v_handle, __pyx_v_pvd); + + /* "PyCafe.pyx":5575 + * status = self._c_cafe.getCache(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5576 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5577 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5578 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5577 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5580 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":5576 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5581 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5583 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5584 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5585 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5586 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5586, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 5583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5582 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5587 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5587, __pyx_L1_error) + + /* "PyCafe.pyx":5581 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5589 + * raise _cafeException + * + * pvd_valnone = PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * # pvd_valnone.value[0]=None + * return pvd_valnone + */ + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvd_valnone = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5591 + * pvd_valnone = PVDataHolderToStruct(pvd, dt) + * # pvd_valnone.value[0]=None + * return pvd_valnone # <<<<<<<<<<<<<< + * + * return PVDataHolderToStruct(pvd, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvd_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvd_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":5575 + * status = self._c_cafe.getCache(handle, pvd) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":5593 + * return pvd_valnone + * + * return PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5554 + * + * ################################################################################## + * def getPVCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5600 + * + * ################################################################################## + * def getCtrl(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_327getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_327getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCtrl (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCtrl") < 0)) __PYX_ERR(0, 5600, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCtrl", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5600, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 5600, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_326getCtrl(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_326getCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVCtrlHolder __pyx_v_pvc; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_pvc_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct __pyx_t_8; + __Pyx_RefNannySetupContext("getCtrl", 0); + + /* "PyCafe.pyx":5603 + * ################################################################################## + * + * cdef str _METHOD = "getCtrl(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getCtrl_handlePV_str_dt_native); + __pyx_v__METHOD = __pyx_kp_u_getCtrl_handlePV_str_dt_native; + + /* "PyCafe.pyx":5605 + * cdef str _METHOD = "getCtrl(handlePV, str dt='native')" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5607 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5608 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5608, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5607 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5609 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5610 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5610, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5609 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5612 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 5612, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5617 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemClientCtrl(handle)) # do this dynamically # <<<<<<<<<<<<<< + * + * cdef int status + */ + (void)(__pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemClientCtrl(__pyx_v_handle))); + + /* "PyCafe.pyx":5620 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCtrl(handle, pvc) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5621 + * cdef int status + * with nogil: + * status = self._c_cafe.getCtrl(handle, pvc) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCtrl(__pyx_v_handle, __pyx_v_pvc); + } + + /* "PyCafe.pyx":5620 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.getCtrl(handle, pvc) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5623 + * status = self._c_cafe.getCtrl(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5624 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5625 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5626 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5625 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5628 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":5624 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5629 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5631 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5632 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5633 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5634 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 5631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5630 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5635 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5635, __pyx_L1_error) + + /* "PyCafe.pyx":5629 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5637 + * raise _cafeException + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * pvc_valnone.value[0] = None + * return pvc_valnone + */ + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5638 + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvc_valnone + * return PVCtrlHolderToStruct(pvc, dt) + */ + if (unlikely(__pyx_v_pvc_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 5638, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvc_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 5638, __pyx_L1_error) + + /* "PyCafe.pyx":5639 + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None + * return pvc_valnone # <<<<<<<<<<<<<< + * return PVCtrlHolderToStruct(pvc, dt) + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvc_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvc_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":5623 + * status = self._c_cafe.getCtrl(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":5640 + * pvc_valnone.value[0] = None + * return pvc_valnone + * return PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5600 + * + * ################################################################################## + * def getCtrl(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5648 + * ################################################################################## + * + * def getCtrlCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCtrlCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getCtrlCache") < 0)) __PYX_ERR(0, 5648, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCtrlCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5648, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrlCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 5648, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_328getCtrlCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PVCtrlHolder __pyx_v_pvc; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_pvc_valnone = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct __pyx_t_8; + __Pyx_RefNannySetupContext("getCtrlCache", 0); + + /* "PyCafe.pyx":5650 + * def getCtrlCache(self, handlePV, str dt='native'): + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * + */ + __Pyx_INCREF(__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat); + __pyx_v__METHOD = __pyx_kp_u_getCtrlCache_handlePV_str_dt_nat; + + /* "PyCafe.pyx":5651 + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5653 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5654 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5654, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5653 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5655 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5656 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5655 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5658 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 5658, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5663 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCtrlCache(__pyx_v_handle))); + + /* "PyCafe.pyx":5666 + * + * + * status = self._c_cafe.getCtrlCache(handle, pvc) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCtrlCache(__pyx_v_handle, __pyx_v_pvc); + + /* "PyCafe.pyx":5668 + * status = self._c_cafe.getCtrlCache(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5669 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5670 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5671 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5670 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5673 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":5669 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5674 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5676 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, # <<<<<<<<<<<<<< + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5677 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5678 + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5679 + * _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 5676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5675 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, + * _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5680 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5680, __pyx_L1_error) + + /* "PyCafe.pyx":5674 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, + */ + } + + /* "PyCafe.pyx":5682 + * raise _cafeException + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * pvc_valnone.value[0] = None + * return pvc_valnone + */ + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5683 + * + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None # <<<<<<<<<<<<<< + * return pvc_valnone + * + */ + if (unlikely(__pyx_v_pvc_valnone->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 5683, __pyx_L1_error) + } + if (unlikely(__Pyx_SetItemInt(__pyx_v_pvc_valnone->value, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 5683, __pyx_L1_error) + + /* "PyCafe.pyx":5684 + * pvc_valnone = PVCtrlHolderToStruct(pvc, dt) + * pvc_valnone.value[0] = None + * return pvc_valnone # <<<<<<<<<<<<<< + * + * return PVCtrlHolderToStruct(pvc, dt) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pvc_valnone)); + __pyx_r = ((PyObject *)__pyx_v_pvc_valnone); + goto __pyx_L0; + + /* "PyCafe.pyx":5668 + * status = self._c_cafe.getCtrlCache(handle, pvc) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":5686 + * return pvc_valnone + * + * return PVCtrlHolderToStruct(pvc, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8.__pyx_n = 1; + __pyx_t_8.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5648 + * ################################################################################## + * + * def getCtrlCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "getCtrlCache(handlePV, str dt='native')" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getCtrlCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5694 + * ################################################################################## + * + * def groupMonitorStop(self, ghandleName): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStop (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_330groupMonitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("groupMonitorStop", 0); + + /* "PyCafe.pyx":5696 + * def groupMonitorStop(self, ghandleName): + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStop_ghandleName); + __pyx_v__METHOD = __pyx_kp_u_groupMonitorStop_ghandleName; + + /* "PyCafe.pyx":5698 + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5699 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5700 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5700, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5699 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5701 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5702 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5702, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5701 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5704 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info= ("First input argument, should be of type " + */ + /*else*/ { + + /* "PyCafe.pyx":5705 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info= ("First input argument, should be of type " + * "if group handle, else if group name")) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5705, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5705, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_8) < 0) __PYX_ERR(0, 5705, __pyx_L1_error) + + /* "PyCafe.pyx":5704 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info= ("First input argument, should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5704, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5708 + * _error_info= ("First input argument, should be of type " + * "if group handle, else if group name")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5708, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5712 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5713 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5712 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5716 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5718 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5719 + * + * with nogil: + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStop(__pyx_v_ghandle, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":5718 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5721 + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5722 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5723 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5722 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5721 + * status = self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5725 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5694 + * ################################################################################## + * + * def groupMonitorStop(self, ghandleName): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD = "groupMonitorStop(ghandleName)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5731 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v__monid = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorPolicyVector (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_monid_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_monid_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getMonitorPolicyVector", 1, 2, 2, 1); __PYX_ERR(0, 5731, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMonitorPolicyVector") < 0)) __PYX_ERR(0, 5731, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v__monid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getMonitorPolicyVector", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5731, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorPolicyVector", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v__monid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_332getMonitorPolicyVector(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v__monid) { + unsigned int __pyx_v_handle; + std::vector __pyx_v_mpV; + struct __pyx_obj_6PyCafe_monitorpolicy *__pyx_v_mp = 0; + unsigned int __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + std::vector ::size_type __pyx_t_9; + std::vector ::size_type __pyx_t_10; + __Pyx_RefNannySetupContext("getMonitorPolicyVector", 0); + + /* "PyCafe.pyx":5733 + * def getMonitorPolicyVector(self, handlePV, _monid): + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5734 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5735 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5735, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5734 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5736 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5737 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV, force=True) # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_handlePV); + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, Py_True) < 0) __PYX_ERR(0, 5737, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5737, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5736 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV, force=True) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5739 + * handle = self.checkForHandle(handlePV, force=True) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(0, 5739, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5744 + * cdef vector[MonitorPolicy] mpV + * + * self.hh.getMonitorPolicyVector(handle, mpV) # <<<<<<<<<<<<<< + * + * cdef monitorpolicy mp + */ + (void)(__pyx_v_self->hh.getMonitorPolicyVector(__pyx_v_handle, __pyx_v_mpV)); + + /* "PyCafe.pyx":5748 + * cdef monitorpolicy mp + * + * mp = monitorpolicy() # <<<<<<<<<<<<<< + * + * cdef unsigned int i + */ + __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_monitorpolicy)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_mp = ((struct __pyx_obj_6PyCafe_monitorpolicy *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5752 + * cdef unsigned int i + * + * for i in range(0, mpV.size()): # <<<<<<<<<<<<<< + * + * if mpV[i].getMonitorID() == _monid: + */ + __pyx_t_9 = __pyx_v_mpV.size(); + __pyx_t_10 = __pyx_t_9; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_10; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":5754 + * for i in range(0, mpV.size()): + * + * if mpV[i].getMonitorID() == _monid: # <<<<<<<<<<<<<< + * + * mp.monid = mpV[i].getMonitorID() + */ + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpV[__pyx_v_i]).getMonitorID()); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v__monid, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5754, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5754, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":5756 + * if mpV[i].getMonitorID() == _monid: + * + * mp.monid = mpV[i].getMonitorID() # <<<<<<<<<<<<<< + * + * mp.nelem = mpV[i].getNelem() + */ + __pyx_v_mp->monid = (__pyx_v_mpV[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5758 + * mp.monid = mpV[i].getMonitorID() + * + * mp.nelem = mpV[i].getNelem() # <<<<<<<<<<<<<< + * + * mp.dataType = mpV[i].getDataType() + */ + __pyx_v_mp->nelem = (__pyx_v_mpV[__pyx_v_i]).getNelem(); + + /* "PyCafe.pyx":5760 + * mp.nelem = mpV[i].getNelem() + * + * mp.dataType = mpV[i].getDataType() # <<<<<<<<<<<<<< + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() + */ + __pyx_v_mp->dataType = (__pyx_v_mpV[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":5761 + * + * mp.dataType = mpV[i].getDataType() + * mp.userArgs = mpV[i].getUserArgs() # <<<<<<<<<<<<<< + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() + */ + __pyx_v_mp->userArgs = ((long)(__pyx_v_mpV[__pyx_v_i]).getUserArgs()); + + /* "PyCafe.pyx":5762 + * mp.dataType = mpV[i].getDataType() + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() # <<<<<<<<<<<<<< + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() + */ + __pyx_v_mp->dbrDataType = (__pyx_v_mpV[__pyx_v_i]).getDbrDataType(); + + /* "PyCafe.pyx":5763 + * mp.userArgs = mpV[i].getUserArgs() + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() # <<<<<<<<<<<<<< + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + */ + __pyx_v_mp->cafeDbrType = (__pyx_v_mpV[__pyx_v_i]).getCafeDbrType(); + + /* "PyCafe.pyx":5764 + * mp.dbrDataType = mpV[i].getDbrDataType() + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() # <<<<<<<<<<<<<< + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + */ + __pyx_v_mp->mask = (__pyx_v_mpV[__pyx_v_i]).getMask(); + + /* "PyCafe.pyx":5765 + * mp.cafeDbrType = mpV[i].getCafeDbrType() + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() # <<<<<<<<<<<<<< + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + */ + __pyx_v_mp->maskHasDBE_PROPERTY = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_PROPERTY(); + + /* "PyCafe.pyx":5766 + * mp.mask = mpV[i].getMask() + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() # <<<<<<<<<<<<<< + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + */ + __pyx_v_mp->maskHasDBE_VALUE = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_VALUE(); + + /* "PyCafe.pyx":5767 + * mp.maskHasDBE_PROPERTY = mpV[i].maskHasDBE_PROPERTY() + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() # <<<<<<<<<<<<<< + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + * break + */ + __pyx_v_mp->maskHasDBE_LOG = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_LOG(); + + /* "PyCafe.pyx":5768 + * mp.maskHasDBE_VALUE = mpV[i].maskHasDBE_VALUE() + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_mp->maskHasDBE_ALARM = (__pyx_v_mpV[__pyx_v_i]).maskHasDBE_ALARM(); + + /* "PyCafe.pyx":5769 + * mp.maskHasDBE_LOG = mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM = mpV[i].maskHasDBE_ALARM() + * break # <<<<<<<<<<<<<< + * + * return mp + */ + goto __pyx_L7_break; + + /* "PyCafe.pyx":5754 + * for i in range(0, mpV.size()): + * + * if mpV[i].getMonitorID() == _monid: # <<<<<<<<<<<<<< + * + * mp.monid = mpV[i].getMonitorID() + */ + } + } + __pyx_L7_break:; + + /* "PyCafe.pyx":5771 + * break + * + * return mp # <<<<<<<<<<<<<< + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_mp)); + __pyx_r = ((PyObject *)__pyx_v_mp); + goto __pyx_L0; + + /* "PyCafe.pyx":5731 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorPolicyVector", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_mp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5773 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_335groupMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_335groupMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitor (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitor") < 0)) __PYX_ERR(0, 5773, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5773, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__94; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5774, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__95; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 5775, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitor", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5773, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_334groupMonitor(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_334groupMonitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("groupMonitor", 0); + + /* "PyCafe.pyx":5776 + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + * return self.groupMonitorStart(ghandleName, cb, dbr, mask, notify_milliseconds) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_groupMonitorStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_notify_milliseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ghandleName, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ghandleName, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_cb); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5773 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5779 + * + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStart (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStart") < 0)) __PYX_ERR(0, 5779, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5780, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__96; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5781, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__97; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 5782, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStart", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5779, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_336groupMonitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + std::vector __pyx_v_mpV; + unsigned long __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + CYTHON_UNUSED PyObject *__pyx_v_handleList = NULL; + long __pyx_v_i; + PyObject *__pyx_v_sig = NULL; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + long __pyx_t_10; + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("groupMonitorStart", 0); + + /* "PyCafe.pyx":5784 + * unsigned short notify_milliseconds=0): + * ################################################################################## + * cdef str _METHOD = "groupMonitorStart(ghandleName, cb, dbr, mask)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStart_ghandleName_cb); + __pyx_v__METHOD = __pyx_kp_u_groupMonitorStart_ghandleName_cb; + + /* "PyCafe.pyx":5786 + * cdef str _METHOD = "groupMonitorStart(ghandleName, cb, dbr, mask)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5787 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5788 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5788, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5787 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5789 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5790 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5790, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5790, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5789 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5792 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5792, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5792, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 5792, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5794 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * if dbr: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5794, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5796 + * raise _cafeException + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":5797 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + __pyx_t_1 = 0; + break; + default: + __pyx_t_1 = 1; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5798 + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( # <<<<<<<<<<<<<< + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStart); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ghandleName); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5800 + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5802 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5803 + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * dbr = DBR_TIME # <<<<<<<<<<<<<< + * + * cdef vector[MonitorPolicy] mpV + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":5797 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + */ + } + + /* "PyCafe.pyx":5796 + * raise _cafeException + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + } + + /* "PyCafe.pyx":5810 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5811 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef MonitorPolicy * mp + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5810 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L10; + } + __pyx_L10:; + } + } + + /* "PyCafe.pyx":5814 + * + * cdef MonitorPolicy * mp + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * handleList = [] + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5816 + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handleList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5817 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * #cb_list = [cb] * pvg.getNPV() + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5821 + * #cb_list = [cb] * pvg.getNPV() + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_9 = __pyx_t_4; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":5823 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":5824 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * mpid = mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":5825 + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * mpid = mp[i].getMonitorID() + * + */ + (__pyx_v_mp[__pyx_v_i]).setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5826 + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * mpid = mp[i].getMonitorID() # <<<<<<<<<<<<<< + * + * if cb: + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5828 + * mpid = mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb) + * # a=inspect.getargspec(cb) + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5828, __pyx_L1_error) + if (__pyx_t_2) { + + /* "PyCafe.pyx":5829 + * + * if cb: + * sig = inspect.signature(cb) # <<<<<<<<<<<<<< + * # a=inspect.getargspec(cb) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_inspect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_signature); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cb); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5832 + * # a=inspect.getargspec(cb) + * + * mp[i].setUserArgs(< void * > mpid) # <<<<<<<<<<<<<< + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) + * mp[i].setPyCyHandler( cb) #cb_list[i]) + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":5833 + * + * mp[i].setUserArgs(< void * > mpid) + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb) #cb_list[i]) + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_mp[__pyx_v_i]).setNoCyCallbackParameters(__pyx_t_11); + + /* "PyCafe.pyx":5834 + * mp[i].setUserArgs(< void * > mpid) + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) + * mp[i].setPyCyHandler( cb) #cb_list[i]) # <<<<<<<<<<<<<< + * + * #print('============//1//') + */ + (__pyx_v_mp[__pyx_v_i]).setPyCyHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":5828 + * mpid = mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb) + * # a=inspect.getargspec(cb) + */ + } + + /* "PyCafe.pyx":5845 + * #print('monitor id', mpid) + * + * mpV.push_back(mp[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + try { + __pyx_v_mpV.push_back((__pyx_v_mp[__pyx_v_i])); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 5845, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":5848 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5850 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5851 + * + * with nogil: + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStart(__pyx_v_ghandle, __pyx_v_vStatus, __pyx_v_mpV); + } + + /* "PyCafe.pyx":5850 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L16; + } + __pyx_L16:; + } + } + + /* "PyCafe.pyx":5853 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5854 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5855 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5854 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5853 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5857 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5779 + * + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5863 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMonitorStartWithCBList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":5864 + * + * def groupMonitorStartWithCBList(self, + * ghandleName, list cb=None, # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=\ + */ + values[1] = ((PyObject*)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStartWithCBList") < 0)) __PYX_ERR(0, 5863, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_cb = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5865, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__100; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5866, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__101; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 5868, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStartWithCBList", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5863, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStartWithCBList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cb), (&PyList_Type), 1, "cb", 1))) __PYX_ERR(0, 5864, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5863 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_338groupMonitorStartWithCBList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + std::vector __pyx_v_mpV; + unsigned long __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + CYTHON_UNUSED PyObject *__pyx_v_handleList = NULL; + long __pyx_v_i; + PyObject *__pyx_v_sig = NULL; + std::vector __pyx_v_vStatus; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + long __pyx_t_11; + __Pyx_RefNannySetupContext("groupMonitorStartWithCBList", 0); + + /* "PyCafe.pyx":5870 + * unsigned short notify_milliseconds=0): + * ############################################################################ + * cdef str _METHOD = ("groupMonitorStartWithCBList(ghandleName, cb," + # <<<<<<<<<<<<<< + * "dbr, mask, notify_milliseconds)") + * + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStartWithCBList_ghan); + __pyx_v__METHOD = __pyx_kp_u_groupMonitorStartWithCBList_ghan; + + /* "PyCafe.pyx":5873 + * "dbr, mask, notify_milliseconds)") + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5874 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5875 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5875, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5874 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5876 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5877 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5877, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5876 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5879 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5879, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5879, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 5879, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5881 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * if dbr: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5881, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5883 + * raise _cafeException + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":5884 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + __pyx_t_1 = 0; + break; + default: + __pyx_t_1 = 1; + break; + } + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5885 + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( # <<<<<<<<<<<<<< + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + * print( + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ghandleName); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5887 + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5889 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5890 + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * dbr = DBR_TIME # <<<<<<<<<<<<<< + * + * if not isinstance(cb, (list)): + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":5884 + * + * if dbr: + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * print( + * "***Warning*** from groupMonitorStartWithCBList for handle(orPV)=", ghandleName) + */ + } + + /* "PyCafe.pyx":5883 + * raise _cafeException + * + * if dbr: # <<<<<<<<<<<<<< + * if dbr not in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * print( + */ + } + + /* "PyCafe.pyx":5892 + * dbr = DBR_TIME + * + * if not isinstance(cb, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * Input cb should be of type and give the list of cb objects") + */ + __pyx_t_2 = PyList_Check(__pyx_v_cb); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5893 + * + * if not isinstance(cb, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * Input cb should be of type and give the list of cb objects") + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 5893, __pyx_L1_error) + + /* "PyCafe.pyx":5892 + * dbr = DBR_TIME + * + * if not isinstance(cb, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * Input cb should be of type and give the list of cb objects") + */ + } + + /* "PyCafe.pyx":5902 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5903 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if (len(cb) != pvg.getNPV()): + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5902 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5905 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * if (len(cb) != pvg.getNPV()): # <<<<<<<<<<<<<< + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 5905, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5905, __pyx_L1_error) + __pyx_t_1 = ((__pyx_t_8 != __pyx_v_pvg.getNPV()) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5906 + * + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), # <<<<<<<<<<<<<< + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvg.getNPV()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":5907 + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + * No of group members doe not match the length of callback object list") + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 5907, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5907, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":5906 + * + * if (len(cb) != pvg.getNPV()): + * print("No of group members is ", pvg.getNPV(), # <<<<<<<<<<<<<< + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ + */ + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_No_of_group_members_is); + __Pyx_GIVEREF(__pyx_kp_u_No_of_group_members_is); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_No_of_group_members_is); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_while_list_of_callback_objects); + __Pyx_GIVEREF(__pyx_kp_u_while_list_of_callback_objects); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_while_list_of_callback_objects); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5908 + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * No of group members doe not match the length of callback object list") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 5908, __pyx_L1_error) + + /* "PyCafe.pyx":5905 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * if (len(cb) != pvg.getNPV()): # <<<<<<<<<<<<<< + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + */ + } + + /* "PyCafe.pyx":5912 + * + * cdef MonitorPolicy * mp + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * handleList = [] + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5914 + * mp = self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * handleList = [] # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_handleList = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5915 + * + * handleList = [] + * handleList = self.getHandlesFromWithinGroup(ghandle) # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5917 + * handleList = self.getHandlesFromWithinGroup(ghandle) + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_10 = __pyx_t_4; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":5919 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":5920 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":5921 + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * + * mpid = mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":5923 + * mp[i].setNotifyDeltaMilliSeconds(notify_milliseconds) + * + * mpid = mp[i].getMonitorID() # <<<<<<<<<<<<<< + * # pyobj = mpid + * # ptr_mpid = &pyobj + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":5928 + * + * # For setUserArgs pass the address of the variable. + * if cb[i]: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb[i]) + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 5928, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5928, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":5929 + * # For setUserArgs pass the address of the variable. + * if cb[i]: + * sig = inspect.signature(cb[i]) # <<<<<<<<<<<<<< + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_inspect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_signature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 5929, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5930 + * if cb[i]: + * sig = inspect.signature(cb[i]) + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) # <<<<<<<<<<<<<< + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) + * mp[i].setPyCyHandler( cb[i]) + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":5931 + * sig = inspect.signature(cb[i]) + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) # <<<<<<<<<<<<<< + * mp[i].setPyCyHandler( cb[i]) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5931, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_mp[__pyx_v_i]).setNoCyCallbackParameters(__pyx_t_8); + + /* "PyCafe.pyx":5932 + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) + * mp[i].setNoCyCallbackParameters(len(sig.parameters)) + * mp[i].setPyCyHandler( cb[i]) # <<<<<<<<<<<<<< + * + * #print('============') + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 5932, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + (__pyx_v_mp[__pyx_v_i]).setPyCyHandler(((void *)__pyx_t_6)); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":5928 + * + * # For setUserArgs pass the address of the variable. + * if cb[i]: # <<<<<<<<<<<<<< + * sig = inspect.signature(cb[i]) + * mp[i].setUserArgs(< void * > mpid) # ( ptr_mpid)[0]) + */ + } + + /* "PyCafe.pyx":5944 + * + * + * mpV.push_back(mp[i]) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + try { + __pyx_v_mpV.push_back((__pyx_v_mp[__pyx_v_i])); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 5944, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":5947 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":5949 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5950 + * + * with nogil: + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupMonitorStart(__pyx_v_ghandle, __pyx_v_vStatus, __pyx_v_mpV); + } + + /* "PyCafe.pyx":5949 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L18; + } + __pyx_L18:; + } + } + + /* "PyCafe.pyx":5952 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5953 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5954 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, vStatus + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":5953 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":5952 + * status = self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":5956 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5863 + * ############################################################################ + * + * def groupMonitorStartWithCBList(self, # <<<<<<<<<<<<<< + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMonitorStartWithCBList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5959 + * + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getHandleFromPVWithinGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pv,&__pyx_n_s_ghandleName,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pv)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getHandleFromPVWithinGroup", 1, 2, 2, 1); __PYX_ERR(0, 5959, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandleFromPVWithinGroup") < 0)) __PYX_ERR(0, 5959, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_pv = ((PyObject*)values[0]); + __pyx_v_ghandleName = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getHandleFromPVWithinGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5959, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pv), (&PyUnicode_Type), 1, "pv", 1))) __PYX_ERR(0, 5959, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_pv, __pyx_v_ghandleName); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_340getHandleFromPVWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_ghandle = NULL; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + char const *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + char const *__pyx_t_7; + unsigned int __pyx_t_8; + __Pyx_RefNannySetupContext("getHandleFromPVWithinGroup", 0); + + /* "PyCafe.pyx":5960 + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __Pyx_INCREF(__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh); + __pyx_v__METHOD = __pyx_kp_u_getHandleFromPVWithinGroup_pv_gh; + + /* "PyCafe.pyx":5961 + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5962 + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + */ + __Pyx_INCREF(__pyx_v_ghandleName); + __pyx_v_ghandle = __pyx_v_ghandleName; + + /* "PyCafe.pyx":5961 + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5963 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5964 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_ghandleName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 5964, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_ghandle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5963 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5966 + * ghandle = self.hh.getGroupHandleFromGroupName(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5966, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5966, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 5966, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5968 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * return self.hh.getHandleFromPVWithinGroup(pv, ghandle) + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5968, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5969 + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + * return self.hh.getHandleFromPVWithinGroup(pv, ghandle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_pv); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 5969, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandle); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5969, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getHandleFromPVWithinGroup(__pyx_t_7, __pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5959 + * + * ################################################################################## + * def getHandleFromPVWithinGroup(self, str pv, ghandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getHandleFromPVWithinGroup(pv. ghandleName)" + * if isinstance(ghandleName, (int, long)): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.getHandleFromPVWithinGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_ghandle); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5973 + * ################################################################################## + * + * def getGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_343getGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_343getGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_342getGroupStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_342getGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupStr", 0); + + /* "PyCafe.pyx":5974 + * + * def getGroupStr(self, ghandleName): + * return self.getGroup(ghandleName, 'str') # <<<<<<<<<<<<<< + * + * def getGroupInt(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5974, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_str}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5974, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_str); + __Pyx_GIVEREF(__pyx_n_u_str); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_str); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5973 + * ################################################################################## + * + * def getGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5976 + * return self.getGroup(ghandleName, 'str') + * + * def getGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_345getGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_345getGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_344getGroupInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_344getGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupInt", 0); + + /* "PyCafe.pyx":5977 + * + * def getGroupInt(self, ghandleName): + * return self.getGroup(ghandleName, 'int') # <<<<<<<<<<<<<< + * + * def getGroupFloat(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5977, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_int}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5977, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_int); + __Pyx_GIVEREF(__pyx_n_u_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5976 + * return self.getGroup(ghandleName, 'str') + * + * def getGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5979 + * return self.getGroup(ghandleName, 'int') + * + * def getGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_346getGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("getGroupFloat", 0); + + /* "PyCafe.pyx":5980 + * + * def getGroupFloat(self, ghandleName): + * return self.getGroup(ghandleName, 'float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5980, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ghandleName, __pyx_n_u_float}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5980, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_ghandleName); + __Pyx_INCREF(__pyx_n_u_float); + __Pyx_GIVEREF(__pyx_n_u_float); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_u_float); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5980, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5979 + * return self.getGroup(ghandleName, 'int') + * + * def getGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5983 + * + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_349getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_349getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getGroup") < 0)) __PYX_ERR(0, 5983, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5983, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 5983, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_348getGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_348getGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + long __pyx_v_i; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_bytesVal = 0; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + long __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + unsigned int __pyx_t_13; + int __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + unsigned int __pyx_t_18; + long __pyx_t_19; + __Pyx_RefNannySetupContext("getGroup", 0); + + /* "PyCafe.pyx":5984 + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_getGroup_ghandleName_str_dt_nati); + __pyx_v__METHOD = __pyx_kp_u_getGroup_ghandleName_str_dt_nati; + + /* "PyCafe.pyx":5985 + * def getGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":5986 + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5987 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5987, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5986 + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5988 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5989 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5989, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":5988 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5991 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 5991, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 5991, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 5991, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5993 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 5993, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":5997 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":5998 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":5997 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":6001 + * + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6002 + * cdef PVDataHolder * pvd + * pvd = pvg.getPVData() + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * pvd[i].setHasAlarm(False) + * pvd[i].setHasTS(False) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_8 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6003 + * pvd = pvg.getPVData() + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) # <<<<<<<<<<<<<< + * pvd[i].setHasTS(False) + * # pvd[i].setRule(False) + */ + (__pyx_v_pvd[__pyx_v_i]).setHasAlarm(0); + + /* "PyCafe.pyx":6004 + * for i in range(0, pvg.getNPV()): + * pvd[i].setHasAlarm(False) + * pvd[i].setHasTS(False) # <<<<<<<<<<<<<< + * # pvd[i].setRule(False) + * + */ + (__pyx_v_pvd[__pyx_v_i]).setHasTS(0); + } + + /* "PyCafe.pyx":6007 + * # pvd[i].setRule(False) + * + * pvg.setPVData(pvd) # <<<<<<<<<<<<<< + * # pvd=pvg.getPVData(); + * # print "get rule 0p", pvd[0].getRule() + */ + __pyx_v_pvg.setPVData(__pyx_v_pvd); + + /* "PyCafe.pyx":6014 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6015 + * + * with nogil: + * status = self._c_cafe.groupGet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status == ECA_TIMEOUT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":6014 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":6017 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status == ECA_TIMEOUT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6018 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6019 + * if status == ECA_TIMEOUT: + * print("======================================================") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6020 + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6021 + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6022 + * print("TIMEOUT in getGroup; switching to getCompoundList") + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvg.getNameAsString()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = NULL; + __pyx_t_11 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_11 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_7); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_dt); + __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6017 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6024 + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6025 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6026 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * # do not raise exception + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6025 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6024 + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6032 + * # pvg.showMaxMax(5,10) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6034 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6034, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6035 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * cdef bytes bytesVal + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6035, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6039 + * cdef bytes bytesVal + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_8 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6040 + * + * for i in range(0, pvg.getNPV()): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":6042 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6042, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6042, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_13; + + /* "PyCafe.pyx":6044 + * dtcheck = getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6044, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6046 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6047 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":6049 + * if dtcheck == CAFE_STRING: + * + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + */ + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6050 + * + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in pvd[i].getPVName(): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":6051 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_6 = __Pyx_PyStr_FromString((__pyx_v_pvd[__pyx_v_i]).getPVName()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6051, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6052 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":6053 + * if '.EGU' in pvd[i].getPVName(): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6053, __pyx_L21_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6053, __pyx_L21_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6054 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6052 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L28_try_end; + __pyx_L21_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6055 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L22_exception_handled; + } + goto __pyx_L23_except_error; + __pyx_L23_except_error:; + + /* "PyCafe.pyx":6052 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L22_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L28_try_end:; + } + + /* "PyCafe.pyx":6051 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":6057 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6058 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":6059 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6059, __pyx_L30_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6059, __pyx_L30_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6060 + * try: + * strVal = (bytesVal).decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6058 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L37_try_end; + __pyx_L30_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6061 + * strVal = (bytesVal).decode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L31_exception_handled; + } + goto __pyx_L32_except_error; + __pyx_L32_except_error:; + + /* "PyCafe.pyx":6058 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L31_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L37_try_end:; + } + + /* "PyCafe.pyx":6057 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + } + + /* "PyCafe.pyx":6063 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6064 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":6065 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6065, __pyx_L39_error) + } + __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6065, __pyx_L39_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6066 + * try: + * strVal = (bytesVal).decode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6064 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L46_try_end; + __pyx_L39_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6067 + * strVal = (bytesVal).decode('utf_16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L40_exception_handled; + } + goto __pyx_L41_except_error; + __pyx_L41_except_error:; + + /* "PyCafe.pyx":6064 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L40_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L46_try_end:; + } + + /* "PyCafe.pyx":6063 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + } + + /* "PyCafe.pyx":6069 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6070 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) #pvd[i].getAsString()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6069 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":6072 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) #pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 6072, __pyx_L1_error) } + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6072, __pyx_L1_error) + + /* "PyCafe.pyx":6047 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":6074 + * localList.append(strVal) #pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6074, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6073 + * + * localList.append(strVal) #pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":6076 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6076, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6075 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":6080 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6081 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6080 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L48; + } + + /* "PyCafe.pyx":6083 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6083, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L48:; + + /* "PyCafe.pyx":6077 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":6086 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6086, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6085 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6088 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6087 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6090 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(None) # no data + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6090, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6090, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6089 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":6092 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(None) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6092, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":6046 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":6094 + * localList.append(None) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6095 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":6096 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString(j) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6098 + * for j in range(0, pvd[i].getNelem()): + * + * bytesVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + */ + __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6098, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6099 + * + * bytesVal = pvd[i].getAsString(j) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in pvd[i].getPVName(): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":6100 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_5 = __Pyx_PyStr_FromString((__pyx_v_pvd[__pyx_v_i]).getPVName()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6101 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":6102 + * if '.EGU' in pvd[i].getPVName(): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6102, __pyx_L52_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6102, __pyx_L52_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6103 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6101 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L59_try_end; + __pyx_L52_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6104 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L53_exception_handled; + } + goto __pyx_L54_except_error; + __pyx_L54_except_error:; + + /* "PyCafe.pyx":6101 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L53_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L59_try_end:; + } + + /* "PyCafe.pyx":6100 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":6106 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6107 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_17); + /*try:*/ { + + /* "PyCafe.pyx":6108 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6108, __pyx_L61_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6108, __pyx_L61_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6109 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6107 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + goto __pyx_L68_try_end; + __pyx_L61_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6110 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L62_exception_handled; + } + goto __pyx_L63_except_error; + __pyx_L63_except_error:; + + /* "PyCafe.pyx":6107 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + goto __pyx_L1_error; + __pyx_L62_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); + __pyx_L68_try_end:; + } + + /* "PyCafe.pyx":6106 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":6112 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6113 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_17); + __Pyx_XGOTREF(__pyx_t_16); + __Pyx_XGOTREF(__pyx_t_15); + /*try:*/ { + + /* "PyCafe.pyx":6114 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + if (unlikely(__pyx_v_bytesVal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 6114, __pyx_L70_error) + } + __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_bytesVal, 0, PY_SSIZE_T_MAX, NULL, NULL, __Pyx_PyUnicode_DecodeUTF16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6114, __pyx_L70_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6115 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6113 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L77_try_end; + __pyx_L70_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6116 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_11) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L71_exception_handled; + } + goto __pyx_L72_except_error; + __pyx_L72_except_error:; + + /* "PyCafe.pyx":6113 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + goto __pyx_L1_error; + __pyx_L71_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_17); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); + __pyx_L77_try_end:; + } + + /* "PyCafe.pyx":6112 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":6118 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6119 + * pass + * if not encoding: + * strVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * + * localListInner.append(strVal) #pvd[i].getAsString(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6118 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + } + + /* "PyCafe.pyx":6121 + * strVal = pvd[i].getAsString(j) + * + * localListInner.append(strVal) #pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_SHORT: + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 6121, __pyx_L1_error) } + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_v_strVal); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6121, __pyx_L1_error) + } + + /* "PyCafe.pyx":6095 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":6124 + * + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6125 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6123 + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":6127 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6128 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6126 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":6131 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6133 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6134 + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6133 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L85; + } + + /* "PyCafe.pyx":6136 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6136, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L85:; + } + + /* "PyCafe.pyx":6129 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":6139 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6141 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6141, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6138 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6143 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6144 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6144, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6142 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6146 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6147 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6145 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":6149 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(None) # no data + * localList.append(localListInner) + */ + __pyx_t_13 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_18 = __pyx_t_13; + for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) { + __pyx_v_j = __pyx_t_19; + + /* "PyCafe.pyx":6150 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListInner, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6150, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":6151 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * return localList, status, statusList + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6151, __pyx_L1_error) + } + __pyx_L19:; + } + + /* "PyCafe.pyx":6153 + * localList.append(localListInner) + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5983 + * + * ################################################################################## + * def getGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroup(ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6161 + * ################################################################################## + * + * def getGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_351getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_351getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getGroupCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getGroupCache") < 0)) __PYX_ERR(0, 6161, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getGroupCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6161, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 6161, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_350getGroupCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_350getGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + PyObject *__pyx_v_statusList = NULL; + unsigned int __pyx_v_dtn; + unsigned int __pyx_v_dtcheck; + PyObject *__pyx_v_bytesVal = 0; + long __pyx_v_i; + int __pyx_v_encoding; + PyObject *__pyx_v_strVal = NULL; + PyObject *__pyx_v_localListInner = NULL; + long __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + long __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + int __pyx_t_15; + unsigned int __pyx_t_16; + long __pyx_t_17; + __Pyx_RefNannySetupContext("getGroupCache", 0); + + /* "PyCafe.pyx":6162 + * + * def getGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + */ + __Pyx_INCREF(__pyx_kp_u_getGroupCache_self_ghandleName_s); + __pyx_v__METHOD = __pyx_kp_u_getGroupCache_self_ghandleName_s; + + /* "PyCafe.pyx":6163 + * def getGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6164 + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6165 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6165, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6164 + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6166 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6167 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6166 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6169 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6169, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6169, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 6169, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6171 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6171, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6175 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6176 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":6175 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":6180 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6181 + * + * with nogil: + * status = self._c_cafe.groupGetCache(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGetCache(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":6180 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":6183 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6184 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6185 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * # do not raise exception + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6184 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6183 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6190 + * #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6192 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * statusList = [] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6193 + * + * localList = [] + * statusList = [] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * cdef bytesVal + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6197 + * cdef bytesVal + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_8 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6198 + * + * for i in range(0, pvg.getNPV()): + * dtn = pvd[i].getDataType() # <<<<<<<<<<<<<< + * + * dtcheck = getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":6200 + * dtn = pvd[i].getDataType() + * + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_10; + + /* "PyCafe.pyx":6202 + * dtcheck = getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6204 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * + */ + __pyx_t_1 = (((__pyx_v_pvd[__pyx_v_i]).getNelem() == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6205 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":6207 + * if dtcheck == CAFE_STRING: + * + * bytesVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + */ + __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_t_5; + __Pyx_INCREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6208 + * + * bytesVal = pvd[i].getAsString() + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in pvd[i].getPVName(): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":6209 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_6 = __Pyx_PyStr_FromString((__pyx_v_pvd[__pyx_v_i]).getPVName()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6210 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":6211 + * if '.EGU' in pvd[i].getPVName(): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6211, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_kp_u_latin_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_latin_1); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6211, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6212 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6210 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L25_try_end; + __pyx_L18_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6213 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L19_exception_handled; + } + goto __pyx_L20_except_error; + __pyx_L20_except_error:; + + /* "PyCafe.pyx":6210 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L19_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L25_try_end:; + } + + /* "PyCafe.pyx":6209 + * bytesVal = pvd[i].getAsString() + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":6215 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6216 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":6217 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6217, __pyx_L27_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6217, __pyx_L27_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6218 + * try: + * strVal = (bytesVal).decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6216 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L34_try_end; + __pyx_L27_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6219 + * strVal = (bytesVal).decode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L28_exception_handled; + } + goto __pyx_L29_except_error; + __pyx_L29_except_error:; + + /* "PyCafe.pyx":6216 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L28_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L34_try_end:; + } + + /* "PyCafe.pyx":6215 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_8') + */ + } + + /* "PyCafe.pyx":6221 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6222 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":6223 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6223, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6223, __pyx_L36_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6224 + * try: + * strVal = (bytesVal).decode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6222 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L43_try_end; + __pyx_L36_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6225 + * strVal = (bytesVal).decode('utf_16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L37_exception_handled; + } + goto __pyx_L38_except_error; + __pyx_L38_except_error:; + + /* "PyCafe.pyx":6222 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L37_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L43_try_end:; + } + + /* "PyCafe.pyx":6221 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf_16') + */ + } + + /* "PyCafe.pyx":6227 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6228 + * pass + * if not encoding: + * strVal = pvd[i].getAsString() # <<<<<<<<<<<<<< + * + * localList.append(strVal) #pvd[i].getAsString()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6227 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString() + * + */ + } + + /* "PyCafe.pyx":6230 + * strVal = pvd[i].getAsString() + * + * localList.append(strVal) #pvd[i].getAsString()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 6230, __pyx_L1_error) } + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_strVal); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6230, __pyx_L1_error) + + /* "PyCafe.pyx":6205 + * + * if pvd[i].getNelem() == 1: + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString() + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":6232 + * localList.append(strVal) #pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6232, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6231 + * + * localList.append(strVal) #pvd[i].getAsString()) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":6234 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * # if enum, string taken as native + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6234, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6233 + * elif dtcheck == CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":6238 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6239 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6238 + * # if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L45; + } + + /* "PyCafe.pyx":6241 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L45:; + + /* "PyCafe.pyx":6235 + * elif dtcheck == CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * # if enum, string taken as native + * + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":6244 + * + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6243 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6246 + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6246, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6245 + * elif dtcheck == CAFE_CHAR: + * localList.append(< unsigned char > pvd[i].getAsChar()) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6248 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(None) # no data + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6248, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6247 + * elif dtcheck == CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":6250 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(None) # no data # <<<<<<<<<<<<<< + * else: + * localListInner = [] + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, Py_None); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6250, __pyx_L1_error) + break; + } + + /* "PyCafe.pyx":6204 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":6252 + * localList.append(None) # no data + * else: + * localListInner = [] # <<<<<<<<<<<<<< + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6253 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":6254 + * localListInner = [] + * if dtcheck == CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * + * bytesVal = pvd[i].getAsString(j) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6256 + * for j in range(0, pvd[i].getNelem()): + * + * bytesVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + */ + __pyx_t_6 = __pyx_convert_PyBytes_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_bytesVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6257 + * + * bytesVal = pvd[i].getAsString(j) + * encoding = False # <<<<<<<<<<<<<< + * if '.EGU' in pvd[i].getPVName(): + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":6258 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + __pyx_t_5 = __Pyx_PyStr_FromString((__pyx_v_pvd[__pyx_v_i]).getPVName()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6258, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_EGU, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6258, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6259 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":6260 + * if '.EGU' in pvd[i].getPVName(): + * try: + * strVal = (bytesVal).decode('latin-1') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6260, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_latin_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_latin_1); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6260, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6261 + * try: + * strVal = (bytesVal).decode('latin-1') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6259 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L56_try_end; + __pyx_L49_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6262 + * strVal = (bytesVal).decode('latin-1') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L50_exception_handled; + } + goto __pyx_L51_except_error; + __pyx_L51_except_error:; + + /* "PyCafe.pyx":6259 + * encoding = False + * if '.EGU' in pvd[i].getPVName(): + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('latin-1') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L50_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L56_try_end:; + } + + /* "PyCafe.pyx":6258 + * bytesVal = pvd[i].getAsString(j) + * encoding = False + * if '.EGU' in pvd[i].getPVName(): # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('latin-1') + */ + } + + /* "PyCafe.pyx":6264 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6265 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + /*try:*/ { + + /* "PyCafe.pyx":6266 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6266, __pyx_L58_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_8); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6266, __pyx_L58_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6267 + * try: + * strVal = (bytesVal).decode('utf-8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6265 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L65_try_end; + __pyx_L58_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6268 + * strVal = (bytesVal).decode('utf-8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L59_exception_handled; + } + goto __pyx_L60_except_error; + __pyx_L60_except_error:; + + /* "PyCafe.pyx":6265 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + goto __pyx_L1_error; + __pyx_L59_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); + __pyx_L65_try_end:; + } + + /* "PyCafe.pyx":6264 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-8') + */ + } + + /* "PyCafe.pyx":6270 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6271 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_12); + /*try:*/ { + + /* "PyCafe.pyx":6272 + * if not encoding: + * try: + * strVal = (bytesVal).decode('utf-16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytesVal, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6272, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_kp_u_utf_16) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_16); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6272, __pyx_L67_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6273 + * try: + * strVal = (bytesVal).decode('utf-16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":6271 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L74_try_end; + __pyx_L67_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6274 + * strVal = (bytesVal).decode('utf-16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_15) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L68_exception_handled; + } + goto __pyx_L69_except_error; + __pyx_L69_except_error:; + + /* "PyCafe.pyx":6271 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * strVal = (bytesVal).decode('utf-16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + goto __pyx_L1_error; + __pyx_L68_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); + __pyx_L74_try_end:; + } + + /* "PyCafe.pyx":6270 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * strVal = (bytesVal).decode('utf-16') + */ + } + + /* "PyCafe.pyx":6276 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + __pyx_t_1 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6277 + * pass + * if not encoding: + * strVal = pvd[i].getAsString(j) # <<<<<<<<<<<<<< + * + * localListInner.append(strVal) #pvd[i].getAsString(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_strVal, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6276 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * strVal = pvd[i].getAsString(j) + * + */ + } + + /* "PyCafe.pyx":6279 + * strVal = pvd[i].getAsString(j) + * + * localListInner.append(strVal) #pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + */ + if (unlikely(!__pyx_v_strVal)) { __Pyx_RaiseUnboundLocalError("strVal"); __PYX_ERR(0, 6279, __pyx_L1_error) } + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_v_strVal); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6279, __pyx_L1_error) + } + + /* "PyCafe.pyx":6253 + * else: + * localListInner = [] + * if dtcheck == CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":6281 + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6282 + * elif dtcheck == CAFE_SHORT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6280 + * + * localListInner.append(strVal) #pvd[i].getAsString(j)) + * elif dtcheck == CAFE_SHORT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":6284 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6285 + * elif dtcheck == CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_ENUM: + * + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6283 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_FLOAT: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + case CAFE_ENUM: + + /* "PyCafe.pyx":6288 + * elif dtcheck == CAFE_ENUM: + * + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6290 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + __pyx_t_1 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6291 + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): + * localListInner.append(pvd[i].getAsString(j)) # <<<<<<<<<<<<<< + * else: + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6290 + * for j in range(0, pvd[i].getNelem()): + * # if enum, string taken as native + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(), ghandle)): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsString(j)) + * else: + */ + goto __pyx_L82; + } + + /* "PyCafe.pyx":6293 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck == CAFE_CHAR: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6293, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L82:; + } + + /* "PyCafe.pyx":6286 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + * elif dtcheck == CAFE_ENUM: # <<<<<<<<<<<<<< + * + * for j in range(0, pvd[i].getNelem()): + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":6296 + * + * elif dtcheck == CAFE_CHAR: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6298 + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6298, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6295 + * localListInner.append(pvd[i].getAsLong(j)) + * + * elif dtcheck == CAFE_CHAR: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * # pvd[i].getAsChar(j)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":6300 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6301 + * elif dtcheck == CAFE_LONG: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6299 + * # pvd[i].getAsChar(j)) + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_LONG: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + */ + break; + case CAFE_DOUBLE: + + /* "PyCafe.pyx":6303 + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6304 + * elif dtcheck == CAFE_DOUBLE: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * else: + * for j in range(0, pvd[i].getNelem()): + */ + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6304, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6302 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsLong(j)) + * elif dtcheck == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) + */ + break; + default: + + /* "PyCafe.pyx":6306 + * localListInner.append(pvd[i].getAsDouble(j)) + * else: + * for j in range(0, pvd[i].getNelem()): # <<<<<<<<<<<<<< + * localListInner.append(None) # no data + * localList.append(localListInner) + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + __pyx_t_16 = __pyx_t_10; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_j = __pyx_t_17; + + /* "PyCafe.pyx":6307 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, Py_None); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6307, __pyx_L1_error) + } + break; + } + + /* "PyCafe.pyx":6308 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(None) # no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * return localList, status, statusList + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6308, __pyx_L1_error) + } + __pyx_L16:; + } + + /* "PyCafe.pyx":6310 + * localList.append(localListInner) + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_localList); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6161 + * ################################################################################## + * + * def getGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getGroupCache(self, ghandleName, str dt='native')" + * cdef unsigned int ghandle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_bytesVal); + __Pyx_XDECREF(__pyx_v_strVal); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6318 + * ################################################################################## + * + * def getPVGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupStr (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_352getPVGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupStr", 0); + + /* "PyCafe.pyx":6319 + * + * def getPVGroupStr(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='str') # <<<<<<<<<<<<<< + * + * def getPVGroupInt(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) __PYX_ERR(0, 6319, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6318 + * ################################################################################## + * + * def getPVGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='str') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6321 + * return self.getPVGroup(ghandleName, dt='str') + * + * def getPVGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupInt (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_354getPVGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupInt", 0); + + /* "PyCafe.pyx":6322 + * + * def getPVGroupInt(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='int') # <<<<<<<<<<<<<< + * + * def getPVGroupFloat(self, ghandleName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) __PYX_ERR(0, 6322, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6321 + * return self.getPVGroup(ghandleName, dt='str') + * + * def getPVGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='int') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6324 + * return self.getPVGroup(ghandleName, dt='int') + * + * def getPVGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupFloat (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_ghandleName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_356getPVGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("getPVGroupFloat", 0); + + /* "PyCafe.pyx":6325 + * + * def getPVGroupFloat(self, ghandleName): + * return self.getPVGroup(ghandleName, dt='float') # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPVGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ghandleName); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) __PYX_ERR(0, 6325, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6324 + * return self.getPVGroup(ghandleName, dt='int') + * + * def getPVGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='float') + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupFloat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6328 + * + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_359getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_359getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVGroup") < 0)) __PYX_ERR(0, 6328, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6328, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 6328, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_358getPVGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_358getPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + long __pyx_v_i; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + unsigned int __pyx_t_11; + long __pyx_t_12; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_13; + int __pyx_t_14; + __Pyx_RefNannySetupContext("getPVGroup", 0); + + /* "PyCafe.pyx":6329 + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_getPVGroup_ghandleName_str_dt_na); + __pyx_v__METHOD = __pyx_kp_u_getPVGroup_ghandleName_str_dt_na; + + /* "PyCafe.pyx":6331 + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6332 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6333 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6333, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6332 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6334 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6335 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * # elif isinstance(ghandleName, (pvgroup)) == 1: + * # print ("We have a PV Group ", type(ghandleName) ) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6334 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6339 + * # print ("We have a PV Group ", type(ghandleName) ) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6339, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6339, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 6339, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6341 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6341, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6347 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6348 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":6347 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":6350 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6361 + * ''' + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6362 + * + * with nogil: + * status = self._c_cafe.groupGet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":6361 + * ''' + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":6364 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6365 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6366 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6367 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6365 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6364 + * status = self._c_cafe.groupGet(ghandle, pvg) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":6371 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + */ + __pyx_t_1 = ((__pyx_v_status == ECA_TIMEOUT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6372 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6373 + * if status == ECA_TIMEOUT: + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6374 + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundPVGroup(ghandle, dt) + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6375 + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundPVGroup); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_9 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_v_dt}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else + #endif + { + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_dt); + __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6371 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + */ + } + + /* "PyCafe.pyx":6377 + * return self.getCompoundPVGroup(ghandle, dt) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6379 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6381 + * localList = [] + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_11 = __pyx_t_4; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":6384 + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + * localList.append(PVDataHolderToStruct(pvd[i], dt)) # <<<<<<<<<<<<<< + * cdef pvgroup pg + * + */ + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 6384, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":6387 + * cdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localList + */ + __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6389 + * pg = pvgroup() + * + * pg.pvdata = localList # <<<<<<<<<<<<<< + * + * pg.npv = pvg.getNPV() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localList; + + /* "PyCafe.pyx":6391 + * pg.pvdata = localList + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":6392 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":6393 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_pvg.getStatusGroup(); + + /* "PyCafe.pyx":6394 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * # pg.showMax(1) + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":6398 + * # pg.showMax(1) + * + * return pg # localList, status # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def getPVGroup(self, ghandleName, str dt='native') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":6328 + * + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroup(ghandleName, str dt='native')" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6405 + * ################################################################################## + * + * def getPVGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroupCache" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVGroupCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_dt,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject*)__pyx_n_u_native); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPVGroupCache") < 0)) __PYX_ERR(0, 6405, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ghandleName = values[0]; + __pyx_v_dt = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVGroupCache", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6405, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), (&PyUnicode_Type), 1, "dt", 1))) __PYX_ERR(0, 6405, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_dt); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_360getPVGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_localList = NULL; + long __pyx_v_i; + struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + unsigned int __pyx_t_8; + long __pyx_t_9; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("getPVGroupCache", 0); + + /* "PyCafe.pyx":6406 + * + * def getPVGroupCache(self, ghandleName, str dt='native'): + * cdef str _METHOD = "getPVGroupCache" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_n_u_getPVGroupCache); + __pyx_v__METHOD = __pyx_n_u_getPVGroupCache; + + /* "PyCafe.pyx":6408 + * cdef str _METHOD = "getPVGroupCache" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6409 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6410 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6410, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6409 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6411 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6412 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * # elif isinstance(ghandleName, (pvgroup)) == 1: + * # print ("We have a PV Group ", type(ghandleName) ) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6412, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":6411 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * # elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6416 + * # print ("We have a PV Group ", type(ghandleName) ) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 6416, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6418 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6418, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6424 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6425 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * print("==============" ) + * print(_METHOD) + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":6424 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":6426 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) # <<<<<<<<<<<<<< + * print(_METHOD) + * pvg.showMax(1) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6427 + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) + * print(_METHOD) # <<<<<<<<<<<<<< + * pvg.showMax(1) + * + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v__METHOD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6428 + * print("==============" ) + * print(_METHOD) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * + * pvd = pvg.getPVData() + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":6430 + * pvg.showMax(1) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6432 + * pvd = pvg.getPVData() + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) # <<<<<<<<<<<<<< + * pvg.showMax(1) + * print("==============" ) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGetCache(__pyx_v_ghandle, __pyx_v_pvg); + + /* "PyCafe.pyx":6433 + * + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * print("==============" ) + * print(status, pvg.getStatusGroup()) + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":6434 + * status = self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) + * print("==============" ) # <<<<<<<<<<<<<< + * print(status, pvg.getStatusGroup()) + * print("==============" ) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6435 + * pvg.showMax(1) + * print("==============" ) + * print(status, pvg.getStatusGroup()) # <<<<<<<<<<<<<< + * print("==============" ) + * if status != ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pvg.getStatusGroup()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6436 + * print("==============" ) + * print(status, pvg.getStatusGroup()) + * print("==============" ) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6437 + * print(status, pvg.getStatusGroup()) + * print("==============" ) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6438 + * print("==============" ) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6439 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6440 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6438 + * print("==============" ) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6437 + * print(status, pvg.getStatusGroup()) + * print("==============" ) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroupCache. Status = %d" % status) + */ + } + + /* "PyCafe.pyx":6444 + * #raise Exception("EXCEPTION RAISED in PyCafe def getPVGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList = [] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":6446 + * pvd = pvg.getPVData() + * + * localList = [] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6448 + * localList = [] + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_8 = __pyx_t_4; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":6451 + * #print(pvd[i].getAsString(0), " " , pvd[i].getStatus()) + * #print(pvd[i].getEpicsTimeStampAsUInt32().secPastEpoch, " ", pvd[i].getEpicsTimeStampAsUInt32().nsec) + * localList.append(PVDataHolderToStruct(pvd[i], dt)) # <<<<<<<<<<<<<< + * cdef pvgroup pg + * + */ + __pyx_t_10.__pyx_n = 1; + __pyx_t_10.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_5); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 6451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":6454 + * cdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata = localList + */ + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6PyCafe_pvgroup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6456 + * pg = pvgroup() + * + * pg.pvdata = localList # <<<<<<<<<<<<<< + * + * pg.npv = pvg.getNPV() + */ + __Pyx_INCREF(__pyx_v_localList); + __Pyx_GIVEREF(__pyx_v_localList); + __Pyx_GOTREF(__pyx_v_pg->pvdata); + __Pyx_DECREF(__pyx_v_pg->pvdata); + __pyx_v_pg->pvdata = __pyx_v_localList; + + /* "PyCafe.pyx":6458 + * pg.pvdata = localList + * + * pg.npv = pvg.getNPV() # <<<<<<<<<<<<<< + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + */ + __pyx_v_pg->npv = __pyx_v_pvg.getNPV(); + + /* "PyCafe.pyx":6459 + * + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() # <<<<<<<<<<<<<< + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() + */ + __pyx_v_pg->name = __pyx_v_pvg.getNameAsString(); + + /* "PyCafe.pyx":6460 + * pg.npv = pvg.getNPV() + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() # <<<<<<<<<<<<<< + * pg.groupHandle = pvg.getGroupHandle() + * + */ + __pyx_v_pg->groupStatus = __pyx_v_pvg.getStatusGroup(); + + /* "PyCafe.pyx":6461 + * pg.name = pvg.getNameAsString() + * pg.groupStatus = pvg.getStatusGroup() + * pg.groupHandle = pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * return pg + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":6463 + * pg.groupHandle = pvg.getGroupHandle() + * + * return pg # <<<<<<<<<<<<<< + * ################################################################################## + * # END: def getPVGroup(self, ghandleName, str dt='native') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_pg)); + __pyx_r = ((PyObject *)__pyx_v_pg); + goto __pyx_L0; + + /* "PyCafe.pyx":6405 + * ################################################################################## + * + * def getPVGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getPVGroupCache" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.getPVGroupCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6470 + * ################################################################################## + * + * def PVGroupValuesToList(self, pvgroup pg): # <<<<<<<<<<<<<< + * glist = [] + * for i in range(0, pg.npv): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("PVGroupValuesToList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pg), __pyx_ptype_6PyCafe_pvgroup, 1, "pg", 0))) __PYX_ERR(0, 6470, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_v_pg)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_362PVGroupValuesToList(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, struct __pyx_obj_6PyCafe_pvgroup *__pyx_v_pg) { + PyObject *__pyx_v_glist = NULL; + long __pyx_v_i; + PyObject *__pyx_v_iL = NULL; + Py_ssize_t __pyx_v_j; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + unsigned int __pyx_t_2; + unsigned int __pyx_t_3; + long __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + __Pyx_RefNannySetupContext("PVGroupValuesToList", 0); + + /* "PyCafe.pyx":6471 + * + * def PVGroupValuesToList(self, pvgroup pg): + * glist = [] # <<<<<<<<<<<<<< + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_glist = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":6472 + * def PVGroupValuesToList(self, pvgroup pg): + * glist = [] + * for i in range(0, pg.npv): # <<<<<<<<<<<<<< + * if len(pg.pvdata[i].value) == 1: + * glist.append(pg.pvdata[i].value[0]) + */ + __pyx_t_2 = __pyx_v_pg->npv; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":6473 + * glist = [] + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * glist.append(pg.pvdata[i].value[0]) + * else: + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6473, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = ((__pyx_t_6 == 1) != 0); + if (__pyx_t_7) { + + /* "PyCafe.pyx":6474 + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: + * glist.append(pg.pvdata[i].value[0]) # <<<<<<<<<<<<<< + * else: + * iL = [] + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6474, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 6474, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6473 + * glist = [] + * for i in range(0, pg.npv): + * if len(pg.pvdata[i].value) == 1: # <<<<<<<<<<<<<< + * glist.append(pg.pvdata[i].value[0]) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":6476 + * glist.append(pg.pvdata[i].value[0]) + * else: + * iL = [] # <<<<<<<<<<<<<< + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) + */ + /*else*/ { + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_iL, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6477 + * else: + * iL = [] + * for j in range(0, len(pg.pvdata[i].value)): # <<<<<<<<<<<<<< + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6477, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_value_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __pyx_t_6; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":6478 + * iL = [] + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) # <<<<<<<<<<<<<< + * glist.append(iL) + * return glist + */ + if (unlikely(__pyx_v_pg->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6478, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_iL, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 6478, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":6479 + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) # <<<<<<<<<<<<<< + * return glist + * ################################################################################## + */ + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_v_iL); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 6479, __pyx_L1_error) + } + __pyx_L5:; + } + + /* "PyCafe.pyx":6480 + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) + * return glist # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_glist); + __pyx_r = __pyx_v_glist; + goto __pyx_L0; + + /* "PyCafe.pyx":6470 + * ################################################################################## + * + * def PVGroupValuesToList(self, pvgroup pg): # <<<<<<<<<<<<<< + * glist = [] + * for i in range(0, pg.npv): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.PVGroupValuesToList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_glist); + __Pyx_XDECREF(__pyx_v_iL); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6485 + * ################################################################################## + * + * def groupMemberList(self, str gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_365groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_365groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupMemberList (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gname), (&PyUnicode_Type), 1, "gname", 1))) __PYX_ERR(0, 6485, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_364groupMemberList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject*)__pyx_v_gname)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_364groupMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gname) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_pvlist; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("groupMemberList", 0); + + /* "PyCafe.pyx":6486 + * + * def groupMemberList(self, str gname): + * cdef str _METHOD = "groupMemberList(self, str gname)" # <<<<<<<<<<<<<< + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + */ + __Pyx_INCREF(__pyx_kp_u_groupMemberList_self_str_gname); + __pyx_v__METHOD = __pyx_kp_u_groupMemberList_self_str_gname; + + /* "PyCafe.pyx":6488 + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_gname); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 6488, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupMemberList(__pyx_t_1, __pyx_v_pvlist); + + /* "PyCafe.pyx":6489 + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6490 + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6491 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return pvlist + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6490 + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6489 + * cdef vector[string] pvlist + * status = self._c_cafe.groupMemberList(gname, pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6493 + * self._c_cafe.printStatusMessage(status) + * + * return pvlist # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_pvlist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6485 + * ################################################################################## + * + * def groupMemberList(self, str gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupMemberList(self, str gname)" + * cdef vector[string] pvlist + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.groupMemberList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6497 + * ################################################################################## + * + * def grouping(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_367grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_367grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("grouping (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("grouping", 1, 2, 2, 1); __PYX_ERR(0, 6497, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "grouping") < 0)) __PYX_ERR(0, 6497, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(0, 6497, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("grouping", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6497, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(0, 6497, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_366grouping(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_366grouping(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + unsigned int __pyx_v_ghandle; + char *__pyx_v__gname; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + CYTHON_UNUSED PyObject *__pyx_v_localList = 0; + PyObject *__pyx_v_statusList = 0; + short __pyx_v_wtfsb; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + Py_ssize_t __pyx_t_13; + Py_ssize_t __pyx_t_14; + Py_ssize_t __pyx_t_15; + __Pyx_RefNannySetupContext("grouping", 0); + + /* "PyCafe.pyx":6498 + * + * def grouping(self, char * gname, list _pvlist): + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" # <<<<<<<<<<<<<< + * + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + */ + __Pyx_INCREF(__pyx_kp_u_grouping_char_gname_list__pvlist); + __pyx_v__METHOD = __pyx_kp_u_grouping_char_gname_list__pvlist; + + /* "PyCafe.pyx":6500 + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6500, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":6502 + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6503 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6504 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6503 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":6502 + * cdef int status = self._c_cafe.groupDefine(gname, _pvlist) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6506 + * self._c_cafe.printStatusMessage(status) + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * cdef char * _gname = gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6507 + * + * cdef unsigned int ghandle = 0 + * cdef char * _gname = gname # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":6509 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "PyCafe.pyx":6511 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6512 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * ELSE: + * #Gil acquired and released within conduit.h + */ + try { + __pyx_t_6 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(0, 6512, __pyx_L12_error) + } + __pyx_v_status = __pyx_t_6; + } + + /* "PyCafe.pyx":6511 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L12_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5_error; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":6509 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L10_try_end; + __pyx_L5_error:; + + /* "PyCafe.pyx":6517 + * #with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) + * except: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + /*except:*/ { + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 6517, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":6519 + * except: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, # <<<<<<<<<<<<<< + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6520 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) + */ + __pyx_t_11 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6520, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_11) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6521 + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6521, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_11) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6521, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_11) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6522 + * _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6522, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_11) < 0) __PYX_ERR(0, 6519, __pyx_L7_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6518 + * status = self._c_cafe.groupOpen(_gname, ghandle) + * except: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6518, __pyx_L7_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":6523 + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), + * _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6523, __pyx_L7_except_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L6_exception_handled; + } + __pyx_L7_except_error:; + + /* "PyCafe.pyx":6509 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L6_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + __pyx_L10_try_end:; + } + + /* "PyCafe.pyx":6525 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6527 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, # <<<<<<<<<<<<<< + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_8) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6528 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv_name, __pyx_t_8) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6529 + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_code, __pyx_t_8) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_text, __pyx_t_8) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6530 + * _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_t_8) < 0) __PYX_ERR(0, 6527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6526 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=ghandle, + * _pv_name=_gname, + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":6531 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6531, __pyx_L1_error) + + /* "PyCafe.pyx":6525 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=ghandle, + */ + } + + /* "PyCafe.pyx":6540 + * list statusList + * + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * + * if wtfsb == FLUSH_NOW: + */ + __pyx_v_wtfsb = __pyx_v_self->_c_cafe->channelOpenGroupPolicy.getWhenToFlushSendBuffer(); + + /* "PyCafe.pyx":6542 + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getGroup(ghandle) + */ + __pyx_t_2 = ((__pyx_v_wtfsb == FLUSH_NOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6544 + * if wtfsb == FLUSH_NOW: + * + * localList, status, statusList = self.getGroup(ghandle) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 6544, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_9 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_11 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); + #else + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + #endif + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext; + index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 2; __pyx_t_11 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 3) < 0) __PYX_ERR(0, 6544, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L19_unpacking_done; + __pyx_L18_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 6544, __pyx_L1_error) + __pyx_L19_unpacking_done:; + } + if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 6544, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6544, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 6544, __pyx_L1_error) + __pyx_v_localList = ((PyObject*)__pyx_t_9); + __pyx_t_9 = 0; + __pyx_v_status = __pyx_t_6; + __pyx_v_statusList = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":6546 + * localList, status, statusList = self.getGroup(ghandle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6547 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("") + * print("Error in def grouping for group named", _gname) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6548 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") # <<<<<<<<<<<<<< + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6549 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + * print("Error in def grouping for group named", _gname) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") + */ + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_kp_u_Error_in_def_grouping_for_group); + __Pyx_GIVEREF(__pyx_kp_u_Error_in_def_grouping_for_group); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_Error_in_def_grouping_for_group); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6550 + * print("") + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6551 + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") # <<<<<<<<<<<<<< + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":6552 + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): # <<<<<<<<<<<<<< + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 6552, __pyx_L1_error) + } + __pyx_t_13 = PyList_GET_SIZE(__pyx_v_statusList); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6552, __pyx_L1_error) + __pyx_t_14 = __pyx_t_13; + for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { + __pyx_v_i = __pyx_t_15; + + /* "PyCafe.pyx":6553 + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6553, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":6554 + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], # <<<<<<<<<<<<<< + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + */ + if (unlikely(__pyx_v__pvlist == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6554, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v__pvlist, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":6555 + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") + */ + __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + + /* "PyCafe.pyx":6554 + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + * print("PV", _pvlist[i], # <<<<<<<<<<<<<< + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + */ + __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_n_u_PV_4); + __Pyx_GIVEREF(__pyx_n_u_PV_4); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_PV_4); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); + __Pyx_INCREF(__pyx_kp_u__111); + __Pyx_GIVEREF(__pyx_kp_u__111); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u__111); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_11); + __Pyx_INCREF(__pyx_kp_u__112); + __Pyx_GIVEREF(__pyx_kp_u__112); + PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__112); + __Pyx_INCREF(__pyx_kp_u_has_error); + __Pyx_GIVEREF(__pyx_kp_u_has_error); + PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_kp_u_has_error); + __pyx_t_7 = 0; + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6556 + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) # <<<<<<<<<<<<<< + * print("") + * return ghandle + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6556, __pyx_L1_error) + } + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6556, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_6); + + /* "PyCafe.pyx":6557 + * "[", i, "]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") # <<<<<<<<<<<<<< + * return ghandle + * + */ + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6553 + * print("Analysing statusList[]...") + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * print("PV", _pvlist[i], + * "[", i, "]", " has error: ") + */ + } + } + + /* "PyCafe.pyx":6547 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print("") + * print("Error in def grouping for group named", _gname) + */ + } + + /* "PyCafe.pyx":6546 + * localList, status, statusList = self.getGroup(ghandle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("") + */ + } + + /* "PyCafe.pyx":6542 + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList, status, statusList = self.getGroup(ghandle) + */ + } + + /* "PyCafe.pyx":6558 + * self._c_cafe.printStatusMessage(statusList[i]) + * print("") + * return ghandle # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6497 + * ################################################################################## + * + * def grouping(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * cdef str _METHOD = "grouping(char * gname, list _pvlist)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.grouping", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6562 + * + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char const *__pyx_v_gname; + char const *__pyx_v_cname; + PyObject *__pyx_v_attrib = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupDefineFromCollection (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_cname,&__pyx_n_s_attrib,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cname)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, 1); __PYX_ERR(0, 6562, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, 2); __PYX_ERR(0, 6562, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupDefineFromCollection") < 0)) __PYX_ERR(0, 6562, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_gname = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(0, 6562, __pyx_L3_error) + __pyx_v_cname = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_cname) && PyErr_Occurred())) __PYX_ERR(0, 6562, __pyx_L3_error) + __pyx_v_attrib = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupDefineFromCollection", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6562, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefineFromCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v_cname, __pyx_v_attrib); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_368groupDefineFromCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gname, char const *__pyx_v_cname, PyObject *__pyx_v_attrib) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v__attribute_list = 0; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + std::vector __pyx_t_5; + __Pyx_RefNannySetupContext("groupDefineFromCollection", 0); + + /* "PyCafe.pyx":6563 + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): + * cdef str _METHOD = "groupDefineFromCollection" # <<<<<<<<<<<<<< + * cdef list _attribute_list + * if isinstance(attrib, str): + */ + __Pyx_INCREF(__pyx_n_u_groupDefineFromCollection); + __pyx_v__METHOD = __pyx_n_u_groupDefineFromCollection; + + /* "PyCafe.pyx":6565 + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + * if isinstance(attrib, str): # <<<<<<<<<<<<<< + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_attrib); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6566 + * cdef list _attribute_list + * if isinstance(attrib, str): + * _attribute_list = [attrib] # <<<<<<<<<<<<<< + * elif isinstance(attrib, list): + * _attribute_list = attrib + */ + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_attrib); + __Pyx_GIVEREF(__pyx_v_attrib); + PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_attrib); + __pyx_v__attribute_list = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":6565 + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + * if isinstance(attrib, str): # <<<<<<<<<<<<<< + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6567 + * if isinstance(attrib, str): + * _attribute_list = [attrib] + * elif isinstance(attrib, list): # <<<<<<<<<<<<<< + * _attribute_list = attrib + * else: + */ + __pyx_t_2 = PyList_Check(__pyx_v_attrib); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6568 + * _attribute_list = [attrib] + * elif isinstance(attrib, list): + * _attribute_list = attrib # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + if (!(likely(PyList_CheckExact(__pyx_v_attrib))||((__pyx_v_attrib) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_attrib)->tp_name), 0))) __PYX_ERR(0, 6568, __pyx_L1_error) + __pyx_t_3 = __pyx_v_attrib; + __Pyx_INCREF(__pyx_t_3); + __pyx_v__attribute_list = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":6567 + * if isinstance(attrib, str): + * _attribute_list = [attrib] + * elif isinstance(attrib, list): # <<<<<<<<<<<<<< + * _attribute_list = attrib + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6570 + * _attribute_list = attrib + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("Third input argument, should be of type " + * "else of ")) + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_error_info, __pyx_kp_u_Third_input_argument_should_be_o) < 0) __PYX_ERR(0, 6570, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6570, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":6573 + * _error_info=("Third input argument, should be of type " + * "else of ")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6573, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6575 + * raise _cafeException + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_5 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v__attribute_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6575, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefineFromCollection(__pyx_v_gname, __pyx_v_cname, __pyx_t_5); + + /* "PyCafe.pyx":6576 + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6577 + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6578 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6577 + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":6576 + * + * status = self._c_cafe.groupDefineFromCollection(gname, cname, _attribute_list) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6579 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6562 + * + * ################################################################################## + * def groupDefineFromCollection(self, const char * gname, const char * cname, attrib): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupDefineFromCollection" + * cdef list _attribute_list + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefineFromCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v__attribute_list); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6583 + * + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_371groupDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_371groupDefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupDefine (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("groupDefine", 1, 2, 2, 1); __PYX_ERR(0, 6583, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupDefine") < 0)) __PYX_ERR(0, 6583, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(0, 6583, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupDefine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6583, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(0, 6583, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_370groupDefine(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_370groupDefine(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("groupDefine", 0); + + /* "PyCafe.pyx":6584 + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6584, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":6585 + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6586 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6587 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6586 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":6585 + * def groupDefine(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6588 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6583 + * + * ################################################################################## + * def groupDefine(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.groupDefine", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6592 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_373defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_373defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("defineGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gname,&__pyx_n_s_pvlist,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("defineGroup", 1, 2, 2, 1); __PYX_ERR(0, 6592, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "defineGroup") < 0)) __PYX_ERR(0, 6592, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_gname = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(0, 6592, __pyx_L3_error) + __pyx_v__pvlist = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("defineGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6592, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.defineGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__pvlist), (&PyList_Type), 1, "_pvlist", 1))) __PYX_ERR(0, 6592, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_372defineGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gname, __pyx_v__pvlist); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_372defineGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist) { + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + std::vector __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("defineGroup", 0); + + /* "PyCafe.pyx":6593 + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6593, __pyx_L1_error) + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":6594 + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6595 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6596 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6595 + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + } + + /* "PyCafe.pyx":6594 + * def defineGroup(self, char * gname, list _pvlist): + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6597 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6592 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * status = self._c_cafe.groupDefine(gname, _pvlist) + * if status != ICAFE_NORMAL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("PyCafe.CyCafe.defineGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6601 + * + * ################################################################################## + * def groupOpen(self, char * gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupOpen(char * gname)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_375groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_375groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname) { + char *__pyx_v_gname; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupOpen (wrapper)", 0); + assert(__pyx_arg_gname); { + __pyx_v_gname = __Pyx_PyObject_AsWritableString(__pyx_arg_gname); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) __PYX_ERR(0, 6601, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_374groupOpen(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char *)__pyx_v_gname)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_374groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname) { + PyObject *__pyx_v__METHOD = 0; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_ghandle; + char *__pyx_v__gname; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("groupOpen", 0); + + /* "PyCafe.pyx":6602 + * ################################################################################## + * def groupOpen(self, char * gname): + * cdef str _METHOD = "groupOpen(char * gname)" # <<<<<<<<<<<<<< + * + * if not isinstance(gname, (str)) : + */ + __Pyx_INCREF(__pyx_kp_u_groupOpen_char_gname); + __pyx_v__METHOD = __pyx_kp_u_groupOpen_char_gname; + + /* "PyCafe.pyx":6604 + * cdef str _METHOD = "groupOpen(char * gname)" + * + * if not isinstance(gname, (str)) : # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + */ + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_gname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6605 + * + * if not isinstance(gname, (str)) : + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument should be for group name") + * raise _cafeException + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6605, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6605, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_c) < 0) __PYX_ERR(0, 6605, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":6607 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6607, __pyx_L1_error) + + /* "PyCafe.pyx":6604 + * cdef str _METHOD = "groupOpen(char * gname)" + * + * if not isinstance(gname, (str)) : # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be for group name") + */ + } + + /* "PyCafe.pyx":6609 + * raise _cafeException + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * cdef char * _gname = gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":6610 + * + * cdef unsigned int ghandle = 0 + * cdef char * _gname = gname # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":6612 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + /*try:*/ { + + /* "PyCafe.pyx":6614 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6615 + * IF PY_EXT_C: + * with nogil: + * status = self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * ELSE: + * #gil acquired and released in conduit.h at import + */ + try { + __pyx_t_8 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(0, 6615, __pyx_L11_error) + } + __pyx_v_status = __pyx_t_8; + } + + /* "PyCafe.pyx":6614 + * try: + * IF PY_EXT_C: + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupOpen(_gname, ghandle) + * ELSE: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L11_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L4_error; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":6612 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":6621 + * status = self._c_cafe.groupOpen(_gname, ghandle) + * + * except: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + */ + /*except:*/ { + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(0, 6621, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":6622 + * + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_11) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6623 + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6623, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_11) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6623, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_11) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6623, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_11) < 0) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":6622 + * + * except: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6622, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":6624 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=ECA_ALLOCMEM, _error_text=self.cs.code(ECA_ALLOCMEM), _error_info=self.cs.info(ECA_ALLOCMEM)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6624, __pyx_L6_except_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L5_exception_handled; + } + __pyx_L6_except_error:; + + /* "PyCafe.pyx":6612 + * cdef char * _gname = gname + * + * try: # <<<<<<<<<<<<<< + * IF PY_EXT_C: + * with nogil: + */ + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + goto __pyx_L1_error; + __pyx_L5_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); + __pyx_L9_try_end:; + } + + /* "PyCafe.pyx":6626 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":6627 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_9 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_1) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv_name, __pyx_t_1) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":6628 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_code, __pyx_t_1) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_text, __pyx_t_1) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_t_1) < 0) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":6627 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":6629 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return ghandle + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6629, __pyx_L1_error) + + /* "PyCafe.pyx":6626 + * raise _cafeException + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=ghandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":6631 + * raise _cafeException + * + * return ghandle # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6601 + * + * ################################################################################## + * def groupOpen(self, char * gname): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupOpen(char * gname)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6636 + * ################################################################################## + * + * def groupClose(self, gHandleName, bint keepGroupName=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupClose(gHandleName)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_377groupClose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_377groupClose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_gHandleName = 0; + int __pyx_v_keepGroupName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupClose (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_gHandleName,&__pyx_n_s_keepGroupName,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gHandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keepGroupName); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupClose") < 0)) __PYX_ERR(0, 6636, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_gHandleName = values[0]; + if (values[1]) { + __pyx_v_keepGroupName = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_keepGroupName == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6636, __pyx_L3_error) + } else { + __pyx_v_keepGroupName = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupClose", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6636, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.groupClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_376groupClose(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_gHandleName, __pyx_v_keepGroupName); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_376groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName, int __pyx_v_keepGroupName) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_gHandle; + PyObject *__pyx_v__gname = 0; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + __Pyx_RefNannySetupContext("groupClose", 0); + + /* "PyCafe.pyx":6637 + * + * def groupClose(self, gHandleName, bint keepGroupName=False): + * cdef str _METHOD = "groupClose(gHandleName)" # <<<<<<<<<<<<<< + * + * cdef unsigned int gHandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_groupClose_gHandleName); + __pyx_v__METHOD = __pyx_kp_u_groupClose_gHandleName; + + /* "PyCafe.pyx":6639 + * cdef str _METHOD = "groupClose(gHandleName)" + * + * cdef unsigned int gHandle = 0 # <<<<<<<<<<<<<< + * cdef str _gname = None + * status = ICAFE_NORMAL + */ + __pyx_v_gHandle = 0; + + /* "PyCafe.pyx":6640 + * + * cdef unsigned int gHandle = 0 + * cdef str _gname = None # <<<<<<<<<<<<<< + * status = ICAFE_NORMAL + * + */ + __Pyx_INCREF(Py_None); + __pyx_v__gname = ((PyObject*)Py_None); + + /* "PyCafe.pyx":6641 + * cdef unsigned int gHandle = 0 + * cdef str _gname = None + * status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if isinstance(gHandleName, (int, long)): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6643 + * status = ICAFE_NORMAL + * + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_gHandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_gHandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6644 + * + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName # <<<<<<<<<<<<<< + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_gHandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6644, __pyx_L1_error) + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":6643 + * status = ICAFE_NORMAL + * + * if isinstance(gHandleName, (int, long)): # <<<<<<<<<<<<<< + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6645 + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_gHandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6646 + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName # <<<<<<<<<<<<<< + * gHandle = self.checkForGroupHandle(gHandleName) + * else: + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_gHandleName))||((__pyx_v_gHandleName) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_gHandleName)->tp_name), 0))) __PYX_ERR(0, 6646, __pyx_L1_error) + __pyx_t_5 = __pyx_v_gHandleName; + __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v__gname, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6647 + * elif isinstance(gHandleName, (str)): + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_gHandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_gHandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6647, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":6645 + * if isinstance(gHandleName, (int, long)): + * gHandle = gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * _gname = gHandleName + * gHandle = self.checkForGroupHandle(gHandleName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6649 + * gHandle = self.checkForGroupHandle(gHandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6649, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6649, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_9) < 0) __PYX_ERR(0, 6649, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6651 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * if gHandle == 0: + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6651, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6653 + * raise _cafeException + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_GROUP_HANDLE + * + */ + __pyx_t_1 = ((__pyx_v_gHandle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6654 + * + * if gHandle == 0: + * status = ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __pyx_v_status = ECAFE_INVALID_GROUP_HANDLE; + + /* "PyCafe.pyx":6656 + * status = ECAFE_INVALID_GROUP_HANDLE + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6657 + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6656 + * status = ECAFE_INVALID_GROUP_HANDLE + * + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + */ + } + + /* "PyCafe.pyx":6658 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_v__gname) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + + /* "PyCafe.pyx":6659 + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6658 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6660 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6660, __pyx_L1_error) + + /* "PyCafe.pyx":6653 + * raise _cafeException + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_GROUP_HANDLE + * + */ + } + + /* "PyCafe.pyx":6663 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) + * #self.ca_pend_io(1.0) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6664 + * + * with nogil: + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) # <<<<<<<<<<<<<< + * #self.ca_pend_io(1.0) + * + */ + try { + __pyx_t_8 = __pyx_v_self->_c_cafe->groupCloseKeepName(__pyx_v_gHandle, __pyx_v_keepGroupName); + } catch(...) { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_CppExn2PyErr(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + __PYX_ERR(0, 6664, __pyx_L9_error) + } + __pyx_v_status = __pyx_t_8; + } + + /* "PyCafe.pyx":6663 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupCloseKeepName(gHandle, keepGroupName) + * #self.ca_pend_io(1.0) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L10; + } + __pyx_L9_error: { + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L1_error; + } + __pyx_L10:; + } + } + + /* "PyCafe.pyx":6667 + * #self.ca_pend_io(1.0) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6668 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv_name, __pyx_v__gname) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + + /* "PyCafe.pyx":6669 + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6668 + * + * if status != ICAFE_NORMAL: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6670 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6670, __pyx_L1_error) + + /* "PyCafe.pyx":6667 + * #self.ca_pend_io(1.0) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=gHandle, _pv_name=_gname, + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":6672 + * raise _cafeException + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6636 + * ################################################################################## + * + * def groupClose(self, gHandleName, bint keepGroupName=False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "groupClose(gHandleName)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.groupClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v__gname); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6676 + * + * + * def isGroup(self, const char * gName): # <<<<<<<<<<<<<< + * return self._c_cafe.isGroup(gName) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_379isGroup(PyObject *__pyx_v_self, PyObject *__pyx_arg_gName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_379isGroup(PyObject *__pyx_v_self, PyObject *__pyx_arg_gName) { + char const *__pyx_v_gName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isGroup (wrapper)", 0); + assert(__pyx_arg_gName); { + __pyx_v_gName = __Pyx_PyObject_AsString(__pyx_arg_gName); if (unlikely((!__pyx_v_gName) && PyErr_Occurred())) __PYX_ERR(0, 6676, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_378isGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_gName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_378isGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_gName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isGroup", 0); + + /* "PyCafe.pyx":6677 + * + * def isGroup(self, const char * gName): + * return self._c_cafe.isGroup(gName) # <<<<<<<<<<<<<< + * + * def isCollection(self, const char * cName): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isGroup(__pyx_v_gName)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6676 + * + * + * def isGroup(self, const char * gName): # <<<<<<<<<<<<<< + * return self._c_cafe.isGroup(gName) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6679 + * return self._c_cafe.isGroup(gName) + * + * def isCollection(self, const char * cName): # <<<<<<<<<<<<<< + * return self._c_cafe.isCollection(cName) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_381isCollection(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_381isCollection(PyObject *__pyx_v_self, PyObject *__pyx_arg_cName) { + char const *__pyx_v_cName; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("isCollection (wrapper)", 0); + assert(__pyx_arg_cName); { + __pyx_v_cName = __Pyx_PyObject_AsString(__pyx_arg_cName); if (unlikely((!__pyx_v_cName) && PyErr_Occurred())) __PYX_ERR(0, 6679, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.isCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_380isCollection(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((char const *)__pyx_v_cName)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_380isCollection(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char const *__pyx_v_cName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("isCollection", 0); + + /* "PyCafe.pyx":6680 + * + * def isCollection(self, const char * cName): + * return self._c_cafe.isCollection(cName) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_c_cafe->isCollection(__pyx_v_cName)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6679 + * return self._c_cafe.isGroup(gName) + * + * def isCollection(self, const char * cName): # <<<<<<<<<<<<<< + * return self._c_cafe.isCollection(cName) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.isCollection", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6685 + * ################################################################################## + * @verify_handlepv + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getNmonitor(handle) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getNoMonitors (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_382getNoMonitors(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getNoMonitors", 0); + + /* "PyCafe.pyx":6686 + * @verify_handlepv + * def getNoMonitors(self, handlePV): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * return self.hh.getNmonitor(handle) + * ################################################################################## + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6686, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":6687 + * def getNoMonitors(self, handlePV): + * cdef unsigned int handle = handlePV + * return self.hh.getNmonitor(handle) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getNmonitor(__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6685 + * ################################################################################## + * @verify_handlepv + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getNmonitor(handle) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getNoMonitors", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6693 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDsInWaiting(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDsInWaiting(handle) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDsInWaiting(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDsInWaiting(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDsInWaiting (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_384getMonitorIDsInWaiting(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_384getMonitorIDsInWaiting(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getMonitorIDsInWaiting", 0); + + /* "PyCafe.pyx":6694 + * @verify_handlepv + * def getMonitorIDsInWaiting(self, handlePV): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * return self.hh.getMonitorIDsInWaiting(handle) + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6694, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":6695 + * def getMonitorIDsInWaiting(self, handlePV): + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDsInWaiting(handle) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_self->hh.getMonitorIDsInWaiting(__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6693 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDsInWaiting(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDsInWaiting(handle) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorIDsInWaiting", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6701 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDs(handle) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_387getMonitorIDs(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_387getMonitorIDs(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDs (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_386getMonitorIDs(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_386getMonitorIDs(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("getMonitorIDs", 0); + + /* "PyCafe.pyx":6702 + * @verify_handlepv + * def getMonitorIDs(self, handlePV): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * return self.hh.getMonitorIDs(handle) + * ############################################################################ + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6702, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":6703 + * def getMonitorIDs(self, handlePV): + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDs(handle) # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_self->hh.getMonitorIDs(__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6701 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDs(handle) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.CyCafe.getMonitorIDs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6707 + * + * @verify_handlepv + * def updateMonitorPolicyDeltaMS( # <<<<<<<<<<<<<< + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + * cdef unsigned int handle = handlePV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_389updateMonitorPolicyDeltaMS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_389updateMonitorPolicyDeltaMS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_monid; + unsigned int __pyx_v_deltaMS; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("updateMonitorPolicyDeltaMS (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_monid_3,&__pyx_n_s_deltaMS,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_monid_3); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deltaMS); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateMonitorPolicyDeltaMS") < 0)) __PYX_ERR(0, 6707, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + if (values[1]) { + __pyx_v_monid = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_monid == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6708, __pyx_L3_error) + } else { + __pyx_v_monid = ((unsigned int)0); + } + if (values[2]) { + __pyx_v_deltaMS = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_deltaMS == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6708, __pyx_L3_error) + } else { + __pyx_v_deltaMS = ((unsigned int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("updateMonitorPolicyDeltaMS", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6707, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.updateMonitorPolicyDeltaMS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_388updateMonitorPolicyDeltaMS(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_monid, __pyx_v_deltaMS); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_388updateMonitorPolicyDeltaMS(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_monid, unsigned int __pyx_v_deltaMS) { + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + __Pyx_RefNannySetupContext("updateMonitorPolicyDeltaMS", 0); + + /* "PyCafe.pyx":6709 + * def updateMonitorPolicyDeltaMS( + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + * cdef unsigned int handle = handlePV # <<<<<<<<<<<<<< + * self.hh.updateMonitorPolicyDeltaMS(handle, monid, deltaMS) + * + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6709, __pyx_L1_error) + __pyx_v_handle = __pyx_t_1; + + /* "PyCafe.pyx":6710 + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + * cdef unsigned int handle = handlePV + * self.hh.updateMonitorPolicyDeltaMS(handle, monid, deltaMS) # <<<<<<<<<<<<<< + * + * + */ + (void)(__pyx_v_self->hh.updateMonitorPolicyDeltaMS(__pyx_v_handle, __pyx_v_monid, __pyx_v_deltaMS)); + + /* "PyCafe.pyx":6707 + * + * @verify_handlepv + * def updateMonitorPolicyDeltaMS( # <<<<<<<<<<<<<< + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + * cdef unsigned int handle = handlePV + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.updateMonitorPolicyDeltaMS", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6715 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_391monitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_391monitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitor (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[5] = {0,0,0,0,0}; + + /* "PyCafe.pyx":6716 + * ############################################################################ + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitor") < 0)) __PYX_ERR(0, 6715, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6716, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__113; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6717, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__114; + } + if (values[4]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[4]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 6718, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitor", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6715, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_390monitor(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6715 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_390monitor(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("monitor", 0); + + /* "PyCafe.pyx":6720 + * unsigned short notify_milliseconds=0): + * + * return self.monitorStart(handlePV, cb, dbr, mask, notify_milliseconds) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_monitorStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_notify_milliseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_handlePV, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_handlePV, __pyx_v_cb, __pyx_t_3, __pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_handlePV); + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_cb); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_5); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6715 + * + * ############################################################################ + * def monitor( # <<<<<<<<<<<<<< + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("PyCafe.CyCafe.monitor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6723 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_393monitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_393monitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + DBR_TYPE __pyx_v_dbr; + unsigned int __pyx_v_mask; + unsigned int __pyx_v_nelem; + unsigned short __pyx_v_notify_milliseconds; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStart (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_cb,&__pyx_n_s_dbr,&__pyx_n_s_mask_2,&__pyx_n_s_nelem_2,&__pyx_n_s_notify_milliseconds,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + + /* "PyCafe.pyx":6724 + * ############################################################################ + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned int nelem=0, + */ + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_notify_milliseconds); + if (value) { values[5] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitorStart") < 0)) __PYX_ERR(0, 6723, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_cb = values[1]; + if (values[2]) { + __pyx_v_dbr = ((DBR_TYPE)__Pyx_PyInt_As_DBR_TYPE(values[2])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6724, __pyx_L3_error) + } else { + __pyx_v_dbr = __pyx_k__115; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6725, __pyx_L3_error) + } else { + __pyx_v_mask = __pyx_k__116; + } + if (values[4]) { + __pyx_v_nelem = __Pyx_PyInt_As_unsigned_int(values[4]); if (unlikely((__pyx_v_nelem == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6726, __pyx_L3_error) + } else { + __pyx_v_nelem = ((unsigned int)0); + } + if (values[5]) { + __pyx_v_notify_milliseconds = __Pyx_PyInt_As_unsigned_short(values[5]); if (unlikely((__pyx_v_notify_milliseconds == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 6727, __pyx_L3_error) + } else { + __pyx_v_notify_milliseconds = ((unsigned short)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitorStart", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6723, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_392monitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask, __pyx_v_nelem, __pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6723 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_392monitorStart(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb, DBR_TYPE __pyx_v_dbr, unsigned int __pyx_v_mask, unsigned int __pyx_v_nelem, unsigned short __pyx_v_notify_milliseconds) { + PyObject *__pyx_v__METHOD = NULL; + PyObject *__pyx_v_pv = NULL; + int __pyx_v_status; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + MonitorPolicy __pyx_v_mp; + unsigned long __pyx_v_mpid; + PyObject *__pyx_v_sig = NULL; + short __pyx_v_wtfsb; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + __Pyx_RefNannySetupContext("monitorStart", 0); + + /* "PyCafe.pyx":6729 + * unsigned short notify_milliseconds=0): + * + * _METHOD = "monitorStart(handlePV, object cb=None, \ # <<<<<<<<<<<<<< + * DBR_TYPE dbr=DBR_TIME, \ + * unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" + */ + __Pyx_INCREF(__pyx_kp_u_monitorStart_handlePV_object_cb); + __pyx_v__METHOD = __pyx_kp_u_monitorStart_handlePV_object_cb; + + /* "PyCafe.pyx":6733 + * unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)" + * + * pv = None # <<<<<<<<<<<<<< + * cdef int status = ICAFE_NORMAL + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_pv = Py_None; + + /* "PyCafe.pyx":6734 + * + * pv = None + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * # cdef pCallback my_callback + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6739 + * # my_callback=callbackHandlerMonitor + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6740 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6741 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * pv = handlePV + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6741, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6740 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6742 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * pv = handlePV + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6743 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * pv = handlePV # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_DECREF_SET(__pyx_v_pv, __pyx_v_handlePV); + + /* "PyCafe.pyx":6744 + * elif isinstance(handlePV, (str)): + * pv = handlePV + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6744, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6742 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * pv = handlePV + * handle = self.checkForHandle(handlePV) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6746 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6747 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6747, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6747, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_10) < 0) __PYX_ERR(0, 6747, __pyx_L1_error) + + /* "PyCafe.pyx":6746 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6750 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * # Does channel Exist? + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6750, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6753 + * + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + */ + __pyx_t_1 = ((!(__pyx_v_self->_c_cafe->isValid(__pyx_v_handle) != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6754 + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException( + */ + __pyx_v_status = ECAFE_INVALID_HANDLE; + + /* "PyCafe.pyx":6755 + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + */ + __pyx_t_1 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6757 + * if self._enable_exceptions: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv_name, __pyx_v_pv) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + + /* "PyCafe.pyx":6758 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6759 + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * return status + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 6757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6756 + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + * _error_code=status, _error_text=self.cs.code(status), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":6760 + * _error_code=status, _error_text=self.cs.code(status), + * _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * return status + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6760, __pyx_L1_error) + + /* "PyCafe.pyx":6755 + * if not self._c_cafe.isValid(handle): + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _handle=handle, _pv_name=pv, + */ + } + + /* "PyCafe.pyx":6761 + * _error_info=self.cs.info(status)) + * raise _cafeException + * return status # <<<<<<<<<<<<<< + * + * cdef MonitorPolicy mp + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6753 + * + * # Does channel Exist? + * if not self._c_cafe.isValid(handle): # <<<<<<<<<<<<<< + * status = ECAFE_INVALID_HANDLE + * if self._enable_exceptions: + */ + } + + /* "PyCafe.pyx":6764 + * + * cdef MonitorPolicy mp + * cdef unsigned long mpid = mp.getMonitorID() # <<<<<<<<<<<<<< + * + * # For setUserArgs pass the address of the variable. + */ + __pyx_v_mpid = __pyx_v_mp.getMonitorID(); + + /* "PyCafe.pyx":6769 + * + * #Default is native number + * if nelem: # <<<<<<<<<<<<<< + * mp.setNelem(nelem) + * + */ + __pyx_t_1 = (__pyx_v_nelem != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6770 + * #Default is native number + * if nelem: + * mp.setNelem(nelem) # <<<<<<<<<<<<<< + * + * mp.setMask(mask) + */ + __pyx_v_mp.setNelem(__pyx_v_nelem); + + /* "PyCafe.pyx":6769 + * + * #Default is native number + * if nelem: # <<<<<<<<<<<<<< + * mp.setNelem(nelem) + * + */ + } + + /* "PyCafe.pyx":6772 + * mp.setNelem(nelem) + * + * mp.setMask(mask) # <<<<<<<<<<<<<< + * mp.setNotifyDeltaMilliSeconds(notify_milliseconds) + * + */ + __pyx_v_mp.setMask(__pyx_v_mask); + + /* "PyCafe.pyx":6773 + * + * mp.setMask(mask) + * mp.setNotifyDeltaMilliSeconds(notify_milliseconds) # <<<<<<<<<<<<<< + * + * #print ("dbr=", dbr) + */ + __pyx_v_mp.setNotifyDeltaMilliSeconds(__pyx_v_notify_milliseconds); + + /* "PyCafe.pyx":6776 + * + * #print ("dbr=", dbr) + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":6779 + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + */ + switch (__pyx_v_dbr) { + case DBR_PLAIN: + case DBR_STS: + case DBR_TIME: + case DBR_GR: + case DBR_CTRL: + + /* "PyCafe.pyx":6781 + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) # <<<<<<<<<<<<<< + * mp.setCafeDbrType(dbr) + * #print ("def monitorStart ", mp.getCafeDbrType()) + */ + __pyx_v_mp.setDataType(__pyx_v_self->channelInfo.getDataType()); + + /* "PyCafe.pyx":6782 + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * #print ("def monitorStart ", mp.getCafeDbrType()) + * #print ("def monitorStart ", mp.getDbrDataType()) + */ + __pyx_v_mp.setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":6779 + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + * if dbr in [DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL]: # <<<<<<<<<<<<<< + * # set Native Datatype first + * mp.setDataType(self.channelInfo.getDataType()) + */ + break; + default: + + /* "PyCafe.pyx":6786 + * #print ("def monitorStart ", mp.getDbrDataType()) + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) # <<<<<<<<<<<<<< + * print("dbr base type should be one of \ + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Warning_from_monitorStart_for_h); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_monitorStart_for_h); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Warning_from_monitorStart_for_h); + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_GIVEREF(__pyx_v_handlePV); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_handlePV); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6787 + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) + * print("dbr base type should be one of \ # <<<<<<<<<<<<<< + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6789 + * print("dbr base type should be one of \ + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(DBR_TIME) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6790 + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + * mp.setDataType(self.channelInfo.getDataType()) # <<<<<<<<<<<<<< + * mp.setCafeDbrType(DBR_TIME) + * + */ + __pyx_v_mp.setDataType(__pyx_v_self->channelInfo.getDataType()); + + /* "PyCafe.pyx":6791 + * print("Assuming DBR_TIME") + * mp.setDataType(self.channelInfo.getDataType()) + * mp.setCafeDbrType(DBR_TIME) # <<<<<<<<<<<<<< + * + * global hmd + */ + __pyx_v_mp.setCafeDbrType(DBR_TIME); + break; + } + + /* "PyCafe.pyx":6795 + * global hmd + * + * if cb is not None: # <<<<<<<<<<<<<< + * #Cement to a global dictionary + * hmd[cb] = mpid ##otherwise cb gets ovewritten when casting to an object + */ + __pyx_t_1 = (__pyx_v_cb != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6797 + * if cb is not None: + * #Cement to a global dictionary + * hmd[cb] = mpid ##otherwise cb gets ovewritten when casting to an object # <<<<<<<<<<<<<< + * + * sig = inspect.signature(cb) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6797, __pyx_L1_error) + } + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_hmd, __pyx_v_cb, __pyx_t_6) < 0)) __PYX_ERR(0, 6797, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6799 + * hmd[cb] = mpid ##otherwise cb gets ovewritten when casting to an object + * + * sig = inspect.signature(cb) # <<<<<<<<<<<<<< + * + * # The corresponding setPyHandler has to be set!! + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_signature); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_cb) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cb); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_sig = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6803 + * # The corresponding setPyHandler has to be set!! + * + * mp.setUserArgs(< void * > mpid) # <<<<<<<<<<<<<< + * mp.setNoCyCallbackParameters(len(sig.parameters)) + * mp.setPyCyHandler( cb) + */ + __pyx_v_mp.setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":6804 + * + * mp.setUserArgs(< void * > mpid) + * mp.setNoCyCallbackParameters(len(sig.parameters)) # <<<<<<<<<<<<<< + * mp.setPyCyHandler( cb) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_parameters); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6804, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6804, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mp.setNoCyCallbackParameters(__pyx_t_8); + + /* "PyCafe.pyx":6805 + * mp.setUserArgs(< void * > mpid) + * mp.setNoCyCallbackParameters(len(sig.parameters)) + * mp.setPyCyHandler( cb) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_mp.setPyCyHandler(((void *)__pyx_v_cb)); + + /* "PyCafe.pyx":6795 + * global hmd + * + * if cb is not None: # <<<<<<<<<<<<<< + * #Cement to a global dictionary + * hmd[cb] = mpid ##otherwise cb gets ovewritten when casting to an object + */ + } + + /* "PyCafe.pyx":6807 + * mp.setPyCyHandler( cb) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStart(handle, mp) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6808 + * + * with nogil: + * status = self._c_cafe.monitorStart(handle, mp) # <<<<<<<<<<<<<< + * + * # Need this to allow a fraction of a second for the callback fn to be called + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStart(__pyx_v_handle, __pyx_v_mp); + } + + /* "PyCafe.pyx":6807 + * mp.setPyCyHandler( cb) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStart(handle, mp) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":6812 + * # Need this to allow a fraction of a second for the callback fn to be called + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() # <<<<<<<<<<<<<< + * if wtfsb == FLUSH_NOW: + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + */ + __pyx_v_wtfsb = __pyx_v_self->_c_cafe->channelOpenGroupPolicy.getWhenToFlushSendBuffer(); + + /* "PyCafe.pyx":6813 + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + */ + __pyx_t_2 = ((__pyx_v_wtfsb == FLUSH_NOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6815 + * if wtfsb == FLUSH_NOW: + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) # <<<<<<<<<<<<<< + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_float_0_01); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6813 + * # if setPyHandler is used + * cdef short wtfsb = self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer() + * if wtfsb == FLUSH_NOW: # <<<<<<<<<<<<<< + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + */ + } + + /* "PyCafe.pyx":6816 + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6817 + * time.sleep(0.01) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6818 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6819 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6818 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":6821 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * return mpid + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L16:; + + /* "PyCafe.pyx":6817 + * time.sleep(0.01) + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6816 + * # if self.getMonitorWhenToFlushSendBuffer() == FLUSH_NOW: + * time.sleep(0.01) + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":6823 + * self._c_cafe.printStatus(handle, status) + * + * return mpid # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_long(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6723 + * + * ############################################################################ + * def monitorStart( # <<<<<<<<<<<<<< + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_pv); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_sig); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6828 + * ############################################################################ + * + * def monitorStop(self, handlePV, mpid=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_395monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_395monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_mpid = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStop (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_mpid,0}; + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpid); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitorStop") < 0)) __PYX_ERR(0, 6828, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_handlePV = values[0]; + __pyx_v_mpid = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitorStop", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6828, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_394monitorStop(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_mpid); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_394monitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_mpid) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + unsigned int __pyx_v_mpid_no_coercion; + PyObject *__pyx_v_l = NULL; + std::vector __pyx_v_mids; + unsigned int __pyx_v_monid; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + std::vector ::iterator __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("monitorStop", 0); + + /* "PyCafe.pyx":6829 + * + * def monitorStop(self, handlePV, mpid=None): + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_monitorStop_handlePV_mpid_None); + __pyx_v__METHOD = __pyx_kp_u_monitorStop_handlePV_mpid_None; + + /* "PyCafe.pyx":6831 + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6832 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6833 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6833, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6832 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6834 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6835 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6835, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6834 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6837 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6838 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6838, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6838, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_3) < 0) __PYX_ERR(0, 6838, __pyx_L1_error) + + /* "PyCafe.pyx":6837 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6841 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6841, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6848 + * global hmd + * + * if mpid: # <<<<<<<<<<<<<< + * mpid_no_coercion = mpid + * if isinstance(mpid, (int, long)): + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mpid); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 6848, __pyx_L1_error) + if (__pyx_t_1) { + + /* "PyCafe.pyx":6849 + * + * if mpid: + * mpid_no_coercion = mpid # <<<<<<<<<<<<<< + * if isinstance(mpid, (int, long)): + * mpid_no_coercion = mpid + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_mpid); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6849, __pyx_L1_error) + __pyx_v_mpid_no_coercion = __pyx_t_4; + + /* "PyCafe.pyx":6850 + * if mpid: + * mpid_no_coercion = mpid + * if isinstance(mpid, (int, long)): # <<<<<<<<<<<<<< + * mpid_no_coercion = mpid + * with nogil: + */ + __pyx_t_2 = PyInt_Check(__pyx_v_mpid); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_mpid); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L8_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6851 + * mpid_no_coercion = mpid + * if isinstance(mpid, (int, long)): + * mpid_no_coercion = mpid # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_mpid); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6851, __pyx_L1_error) + __pyx_v_mpid_no_coercion = __pyx_t_4; + + /* "PyCafe.pyx":6852 + * if isinstance(mpid, (int, long)): + * mpid_no_coercion = mpid + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) + * time.sleep(0.001) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6853 + * mpid_no_coercion = mpid + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) # <<<<<<<<<<<<<< + * time.sleep(0.001) + * l = None + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStopWithID(__pyx_v_handle, __pyx_v_mpid_no_coercion); + } + + /* "PyCafe.pyx":6852 + * if isinstance(mpid, (int, long)): + * mpid_no_coercion = mpid + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) + * time.sleep(0.001) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":6854 + * with nogil: + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) + * time.sleep(0.001) # <<<<<<<<<<<<<< + * l = None + * if mpid not in list(hmd.values()): + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6855 + * status = self._c_cafe.monitorStopWithID(handle, mpid_no_coercion) + * time.sleep(0.001) + * l = None # <<<<<<<<<<<<<< + * if mpid not in list(hmd.values()): + * pass #happens when is direct mode in table widget + */ + __Pyx_INCREF(Py_None); + __pyx_v_l = Py_None; + + /* "PyCafe.pyx":6856 + * time.sleep(0.001) + * l = None + * if mpid not in list(hmd.values()): # <<<<<<<<<<<<<< + * pass #happens when is direct mode in table widget + * else: + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 6856, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyDict_Values(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_mpid, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6856, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + goto __pyx_L13; + } + + /* "PyCafe.pyx":6859 + * pass #happens when is direct mode in table widget + * else: + * l = list(hmd.keys())[list(hmd.values()).index(mpid)] # <<<<<<<<<<<<<< + * if l is not None: + * del hmd[l] + */ + /*else*/ { + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 6859, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 6859, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_PyDict_Values(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_mpid) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_mpid); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_l, __pyx_t_5); + __pyx_t_5 = 0; + } + __pyx_L13:; + + /* "PyCafe.pyx":6860 + * else: + * l = list(hmd.keys())[list(hmd.values()).index(mpid)] + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * else: + */ + __pyx_t_1 = (__pyx_v_l != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6861 + * l = list(hmd.keys())[list(hmd.values()).index(mpid)] + * if l is not None: + * del hmd[l] # <<<<<<<<<<<<<< + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6861, __pyx_L1_error) + } + if (unlikely(PyDict_DelItem(__pyx_v_6PyCafe_hmd, __pyx_v_l) < 0)) __PYX_ERR(0, 6861, __pyx_L1_error) + + /* "PyCafe.pyx":6860 + * else: + * l = list(hmd.keys())[list(hmd.values()).index(mpid)] + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * else: + */ + } + + /* "PyCafe.pyx":6850 + * if mpid: + * mpid_no_coercion = mpid + * if isinstance(mpid, (int, long)): # <<<<<<<<<<<<<< + * mpid_no_coercion = mpid + * with nogil: + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":6863 + * del hmd[l] + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be of type ") + * else: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 6863, __pyx_L1_error) + } + __pyx_L7:; + + /* "PyCafe.pyx":6848 + * global hmd + * + * if mpid: # <<<<<<<<<<<<<< + * mpid_no_coercion = mpid + * if isinstance(mpid, (int, long)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":6866 + * monitorPolicy ID (mpid) should be of type ") + * else: + * mids = self.hh.getMonitorIDs(handle) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.monitorStop(handle) + */ + /*else*/ { + __pyx_v_mids = __pyx_v_self->hh.getMonitorIDs(__pyx_v_handle); + + /* "PyCafe.pyx":6867 + * else: + * mids = self.hh.getMonitorIDs(handle) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.001) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6868 + * mids = self.hh.getMonitorIDs(handle) + * with nogil: + * status = self._c_cafe.monitorStop(handle) # <<<<<<<<<<<<<< + * time.sleep(0.001) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStop(__pyx_v_handle); + } + + /* "PyCafe.pyx":6867 + * else: + * mids = self.hh.getMonitorIDs(handle) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.001) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":6869 + * with nogil: + * status = self._c_cafe.monitorStop(handle) + * time.sleep(0.001) # <<<<<<<<<<<<<< + * + * for monid in mids: + */ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_float_0_001) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_float_0_001); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":6871 + * time.sleep(0.001) + * + * for monid in mids: # <<<<<<<<<<<<<< + * if monid not in list(hmd.values()): + * continue + */ + __pyx_t_9 = __pyx_v_mids.begin(); + for (;;) { + if (!(__pyx_t_9 != __pyx_v_mids.end())) break; + __pyx_t_4 = *__pyx_t_9; + ++__pyx_t_9; + __pyx_v_monid = __pyx_t_4; + + /* "PyCafe.pyx":6872 + * + * for monid in mids: + * if monid not in list(hmd.values()): # <<<<<<<<<<<<<< + * continue + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_monid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 6872, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyDict_Values(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 6872, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6873 + * for monid in mids: + * if monid not in list(hmd.values()): + * continue # <<<<<<<<<<<<<< + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + * if l is not None: + */ + goto __pyx_L18_continue; + + /* "PyCafe.pyx":6872 + * + * for monid in mids: + * if monid not in list(hmd.values()): # <<<<<<<<<<<<<< + * continue + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + */ + } + + /* "PyCafe.pyx":6874 + * if monid not in list(hmd.values()): + * continue + * l = list(hmd.keys())[list(hmd.values()).index(monid)] # <<<<<<<<<<<<<< + * if l is not None: + * del hmd[l] + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); + __PYX_ERR(0, 6874, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); + __PYX_ERR(0, 6874, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyDict_Values(__pyx_v_6PyCafe_hmd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_monid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6875 + * continue + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * + */ + __pyx_t_1 = (__pyx_v_l != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6876 + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + * if l is not None: + * del hmd[l] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 6876, __pyx_L1_error) + } + if (unlikely(PyDict_DelItem(__pyx_v_6PyCafe_hmd, __pyx_v_l) < 0)) __PYX_ERR(0, 6876, __pyx_L1_error) + + /* "PyCafe.pyx":6875 + * continue + * l = list(hmd.keys())[list(hmd.values()).index(monid)] + * if l is not None: # <<<<<<<<<<<<<< + * del hmd[l] + * + */ + } + + /* "PyCafe.pyx":6871 + * time.sleep(0.001) + * + * for monid in mids: # <<<<<<<<<<<<<< + * if monid not in list(hmd.values()): + * continue + */ + __pyx_L18_continue:; + } + } + __pyx_L6:; + + /* "PyCafe.pyx":6878 + * del hmd[l] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6879 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6880 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_2 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6881 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6880 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":6883 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * + * return status + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L24:; + + /* "PyCafe.pyx":6879 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6878 + * del hmd[l] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":6885 + * self._c_cafe.printStatus(handle, status) + * + * return status # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6828 + * ############################################################################ + * + * def monitorStop(self, handlePV, mpid=None): # <<<<<<<<<<<<<< + * cdef str _METHOD = "monitorStop(handlePV, mpid=None)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_l); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6888 + * + * ############################################################################ + * def monitorStopAll(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "monitorStopAll()" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_397monitorStopAll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_397monitorStopAll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("monitorStopAll (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_396monitorStopAll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_396monitorStopAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("monitorStopAll", 0); + + /* "PyCafe.pyx":6890 + * def monitorStopAll(self): + * + * cdef str _METHOD = "monitorStopAll()" # <<<<<<<<<<<<<< + * cdef int status + * + */ + __Pyx_INCREF(__pyx_kp_u_monitorStopAll); + __pyx_v__METHOD = __pyx_kp_u_monitorStopAll; + + /* "PyCafe.pyx":6894 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopAll() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":6895 + * + * with nogil: + * status = self._c_cafe.monitorStopAll() # <<<<<<<<<<<<<< + * + * # give plenty of time for monitors to stop! + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStopAll(); + } + + /* "PyCafe.pyx":6894 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.monitorStopAll() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":6898 + * + * # give plenty of time for monitors to stop! + * time.sleep(0.2) # <<<<<<<<<<<<<< + * + * hmd.clear() + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_float_0_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":6900 + * time.sleep(0.2) + * + * hmd.clear() # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + if (unlikely(__pyx_v_6PyCafe_hmd == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); + __PYX_ERR(0, 6900, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyDict_Clear(__pyx_v_6PyCafe_hmd); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 6900, __pyx_L1_error) + + /* "PyCafe.pyx":6902 + * hmd.clear() + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":6903 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":6904 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":6903 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":6907 + * raise Exception( + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + * .format(status)) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":6905 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = {0}" + * .format(status)) + */ + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6905, __pyx_L1_error) + + /* "PyCafe.pyx":6902 + * hmd.clear() + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":6909 + * .format(status)) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6888 + * + * ############################################################################ + * def monitorStopAll(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "monitorStopAll()" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("PyCafe.CyCafe.monitorStopAll", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":6914 + * ############################################################################## + * + * def set(self, handlePV, valSet): # <<<<<<<<<<<<<< + * cdef str _METHOD = "set(handlePV, valSet)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_399set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_399set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_valSet,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 6914, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 6914, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_valSet = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6914, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_398set(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_valSet); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_398set(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_valSet) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned short __pyx_v_valType; + int __pyx_v_status; + float __pyx_v_valSetF; + double __pyx_v_valSetD; + int __pyx_v_valSetI; + PY_LONG_LONG __pyx_v_valSetLL; + short __pyx_v_valSetShort; + unsigned short __pyx_v_valSetUShort; + std::string __pyx_v_valSetS; + std::vector __pyx_v_vecD; + std::vector __pyx_v_vecF; + std::vector __pyx_v_vecShort; + std::vector __pyx_v_vecUShort; + std::vector __pyx_v_vecChar; + std::vector __pyx_v_vecI; + std::vector __pyx_v_vecS; + unsigned int __pyx_v_nLA; + PyObject *__pyx_v_ctypesString = 0; + PyObject *__pyx_v_ctypesUChar = 0; + PyObject *__pyx_v_ctypesShort = 0; + PyObject *__pyx_v_ctypesUShort = 0; + PyObject *__pyx_v_ctypesInt = 0; + PyObject *__pyx_v_ctypesLongLong = 0; + PyObject *__pyx_v_dtypesString = 0; + PyObject *__pyx_v_dtypesUChar = 0; + PyObject *__pyx_v_dtypesShort = 0; + PyObject *__pyx_v_dtypesUShort = 0; + PyObject *__pyx_v_dtypesInt = 0; + PyObject *__pyx_v_dtypesLongLong = 0; + PyObject *__pyx_v_dtypesFloat = 0; + PyObject *__pyx_v_dtypesDouble = 0; + int __pyx_v_isGoodType; + int __pyx_v_isBytesType; + PyObject *__pyx_v_classType = 0; + PyObject *__pyx_v_substringmv = 0; + PyObject *__pyx_v_class_name = NULL; + int __pyx_v_data_type; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v_temp = NULL; + int __pyx_v_encoding; + unsigned char __pyx_v_valSetUChar; + PyObject *__pyx_v_ex = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + int __pyx_t_17; + Py_ssize_t __pyx_t_18; + unsigned int __pyx_t_19; + Py_ssize_t __pyx_t_20; + Py_ssize_t __pyx_t_21; + double __pyx_t_22; + float __pyx_t_23; + dbr_long_t __pyx_t_24; + short __pyx_t_25; + unsigned short __pyx_t_26; + dbr_char_t __pyx_t_27; + PyObject *__pyx_t_28 = NULL; + PyObject *__pyx_t_29 = NULL; + PyObject *__pyx_t_30 = NULL; + std::string __pyx_t_31; + PY_LONG_LONG __pyx_t_32; + unsigned char __pyx_t_33; + int __pyx_t_34; + char const *__pyx_t_35; + PyObject *__pyx_t_36 = NULL; + PyObject *__pyx_t_37 = NULL; + PyObject *__pyx_t_38 = NULL; + PyObject *__pyx_t_39 = NULL; + PyObject *__pyx_t_40 = NULL; + PyObject *__pyx_t_41 = NULL; + __Pyx_RefNannySetupContext("set", 0); + __Pyx_INCREF(__pyx_v_valSet); + + /* "PyCafe.pyx":6915 + * + * def set(self, handlePV, valSet): + * cdef str _METHOD = "set(handlePV, valSet)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_set_handlePV_valSet); + __pyx_v__METHOD = __pyx_kp_u_set_handlePV_valSet; + + /* "PyCafe.pyx":6917 + * cdef str _METHOD = "set(handlePV, valSet)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int, long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":6919 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":6920 + * + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6920, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6919 + * cdef unsigned int handle = 0 + * + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6921 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":6922 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":6921 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":6924 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + /*else*/ { + + /* "PyCafe.pyx":6925 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 6925, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 6925, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_3) < 0) __PYX_ERR(0, 6925, __pyx_L1_error) + + /* "PyCafe.pyx":6924 + * handle = self.checkForHandle(handlePV) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6928 + * _error_info="First input argument, should be of type if handle, \ + * else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 6928, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":6933 + * # CHECK FOR ALL DATA TYPES! + * + * cdef unsigned short valType = CAFE_STRING # <<<<<<<<<<<<<< + * cdef int status = ICAFE_NORMAL + * cdef float valSetF + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":6934 + * + * cdef unsigned short valType = CAFE_STRING + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef float valSetF + * cdef double valSetD + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":6951 + * cdef vector[string] vecS + * + * cdef unsigned int nLA = 0 # <<<<<<<<<<<<<< + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + */ + __pyx_v_nLA = 0; + + /* "PyCafe.pyx":6953 + * cdef unsigned int nLA = 0 + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) # <<<<<<<<<<<<<< + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_wchar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_wchar_p); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesString = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6954 + * + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) # <<<<<<<<<<<<<< + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_char); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ubyte); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6954, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_5 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesUChar = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6955 + * cdef tuple ctypesString = (ctypes.c_wchar, ctypes.c_char_p, ctypes.c_wchar_p) + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) # <<<<<<<<<<<<<< + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_short); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_byte); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8); + __pyx_t_9 = 0; + __pyx_t_5 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6956 + * cdef tuple ctypesUChar = (ctypes.c_char, ctypes.c_ubyte, ctypes.c_bool, ctypes.c_uint8, ) + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) # <<<<<<<<<<<<<< + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ushort); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6956, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_v_ctypesUShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6957 + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, # <<<<<<<<<<<<<< + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6958 + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) # <<<<<<<<<<<<<< + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6957 + * cdef tuple ctypesShort = (ctypes.c_int16, ctypes.c_int8, ctypes.c_short, ctypes.c_byte) + * cdef tuple ctypesUShort = (ctypes.c_uint16, ctypes.c_ushort) + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, # <<<<<<<<<<<<<< + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + */ + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_5 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesInt = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6959 + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, # <<<<<<<<<<<<<< + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_uint64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6960 + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, # <<<<<<<<<<<<<< + * ctypes.c_longlong, ctypes.c_ssize_t, + * ctypes.c_void_p, ctypes.c_voidp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ulong); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ulonglong); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_longdouble); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 6960, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6961 + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, # <<<<<<<<<<<<<< + * ctypes.c_void_p, ctypes.c_voidp) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_longlong); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_ssize_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 6961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6962 + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + * ctypes.c_void_p, ctypes.c_voidp) # <<<<<<<<<<<<<< + * + * # ctypes.c_char, ctypes.c_float, ctypes.c_double are separate + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_voidp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6959 + * cdef tuple ctypesInt = (ctypes.c_int, ctypes.c_int32, + * ctypes.c_long, ctypes.c_size_t) + * cdef tuple ctypesLongLong = (ctypes.c_uint, ctypes.c_uint32, ctypes.c_int64, ctypes.c_uint64, # <<<<<<<<<<<<<< + * ctypes.c_ulong, ctypes.c_ulonglong, ctypes.c_longdouble, + * ctypes.c_longlong, ctypes.c_ssize_t, + */ + __pyx_t_6 = PyTuple_New(11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 9, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 10, __pyx_t_16); + __pyx_t_9 = 0; + __pyx_t_5 = 0; + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_v_ctypesLongLong = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6966 + * # ctypes.c_char, ctypes.c_float, ctypes.c_double are separate + * + * cdef tuple dtypesString = (np.str_, np.unicode_) # <<<<<<<<<<<<<< + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_str_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15); + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_v_dtypesString = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6967 + * + * cdef tuple dtypesString = (np.str_, np.unicode_) + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) # <<<<<<<<<<<<<< + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ubyte); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_13); + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_t_14 = 0; + __pyx_t_13 = 0; + __pyx_v_dtypesUChar = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6968 + * cdef tuple dtypesString = (np.str_, np.unicode_) + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) # <<<<<<<<<<<<<< + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_byte); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_short); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_15); + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_v_dtypesShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6969 + * cdef tuple dtypesUChar = (np.ubyte, np.bool8, np.bool_, np.uint8) + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) # <<<<<<<<<<<<<< + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ushort); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_v_dtypesUShort = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6970 + * cdef tuple dtypesShort = (np.byte, np.short, np.int8, np.int16) + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) # <<<<<<<<<<<<<< + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + * np.ulonglong, np.longlong, np.intp, np.uintp) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_intc); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintp); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_13); + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_t_14 = 0; + __pyx_t_13 = 0; + __pyx_v_dtypesInt = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6971 + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, # <<<<<<<<<<<<<< + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintc); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6972 + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, + * np.ulonglong, np.longlong, np.intp, np.uintp) # <<<<<<<<<<<<<< + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ulonglong); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_longlong); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_intp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uintp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":6971 + * cdef tuple dtypesUShort = (np.uint16, np.ushort) + * cdef tuple dtypesInt = (np.int_, np.intc, np.int32, np.uintp) + * cdef tuple dtypesLongLong = (np.uint, np.uintc, np.uint32, np.int64, np.uint64, # <<<<<<<<<<<<<< + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + */ + __pyx_t_6 = PyTuple_New(9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 8, __pyx_t_8); + __pyx_t_13 = 0; + __pyx_t_14 = 0; + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_dtypesLongLong = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6974 + * np.ulonglong, np.longlong, np.intp, np.uintp) + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) # <<<<<<<<<<<<<< + * cdef tuple dtypesDouble = (np.double, np.float_, np.float64) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_single); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_10); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_v_dtypesFloat = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6975 + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + * cdef tuple dtypesDouble = (np.double, np.float_, np.float64) # <<<<<<<<<<<<<< + * + * # List: Major[0] Minor[1] Patch[2] 'final'[3] 0 [4] + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8); + __pyx_t_10 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_dtypesDouble = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":6980 + * # print "type= // ", type(valSet) + * + * cdef bint isGoodType = False # <<<<<<<<<<<<<< + * cdef bint isBytesType = False + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":6981 + * + * cdef bint isGoodType = False + * cdef bint isBytesType = False # <<<<<<<<<<<<<< + * + * # print('set method', type(valSet)) + */ + __pyx_v_isBytesType = 0; + + /* "PyCafe.pyx":7003 + * # print(type(valSet)) + * # print (valSet.__class__) + * cdef str classType = (valSet.__class__).__name__ # <<<<<<<<<<<<<< + * cdef str substringmv = "_memoryviewslice" + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 7003, __pyx_L1_error) + __pyx_v_classType = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7004 + * # print (valSet.__class__) + * cdef str classType = (valSet.__class__).__name__ + * cdef str substringmv = "_memoryviewslice" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_n_u_memoryviewslice_2); + __pyx_v_substringmv = __pyx_n_u_memoryviewslice_2; + + /* "PyCafe.pyx":7012 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_python_version); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_tuple__119, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7012, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":7015 + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * else: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_memoryview); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = PyList_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_ptype_7cpython_5array_array); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_8); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_memoryview_type); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7016 + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): + * isGoodType = True # <<<<<<<<<<<<<< + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":7015 + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + * if isinstance(valSet, (list, array.array, np.ndarray, cython.view.memoryview, memoryview, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * else: + */ + } + + /* "PyCafe.pyx":7012 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7018 + * isGoodType = True + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = PyList_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_valSet, __pyx_ptype_7cpython_5array_array); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7019 + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): + * isGoodType = True # <<<<<<<<<<<<<< + * + * if (isGoodType == False): + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":7018 + * isGoodType = True + * else: + * if isinstance(valSet, (list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + } + } + __pyx_L6:; + + /* "PyCafe.pyx":7021 + * isGoodType = True + * + * if (isGoodType == False): # <<<<<<<<<<<<<< + * if (substringmv in classType): + * isGoodType = True + */ + __pyx_t_1 = ((__pyx_v_isGoodType == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7022 + * + * if (isGoodType == False): + * if (substringmv in classType): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + if (unlikely(__pyx_v_classType == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 7022, __pyx_L1_error) + } + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_substringmv, __pyx_v_classType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7022, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7023 + * if (isGoodType == False): + * if (substringmv in classType): + * isGoodType = True # <<<<<<<<<<<<<< + * + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":7022 + * + * if (isGoodType == False): + * if (substringmv in classType): # <<<<<<<<<<<<<< + * isGoodType = True + * + */ + } + + /* "PyCafe.pyx":7021 + * isGoodType = True + * + * if (isGoodType == False): # <<<<<<<<<<<<<< + * if (substringmv in classType): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":7027 + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): # <<<<<<<<<<<<<< + * if isinstance(valSet[0], bytes): + * isGoodType = False + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7027, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7028 + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): # <<<<<<<<<<<<<< + * isGoodType = False + * isBytesType = True + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7028, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = PyBytes_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7029 + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): + * isGoodType = False # <<<<<<<<<<<<<< + * isBytesType = True + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":7030 + * if isinstance(valSet[0], bytes): + * isGoodType = False + * isBytesType = True # <<<<<<<<<<<<<< + * + * # where the element of the array is of type bytes - there need to match to cafe.setSrting + */ + __pyx_v_isBytesType = 1; + + /* "PyCafe.pyx":7028 + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): + * if isinstance(valSet[0], bytes): # <<<<<<<<<<<<<< + * isGoodType = False + * isBytesType = True + */ + } + + /* "PyCafe.pyx":7027 + * # This is to cater for ctypes.c_buffer which is an instance of ctypes.Array + * # where the element of the array is of type bytes - there need to match to cafe.setString + * if isinstance(valSet, ctypes.Array): # <<<<<<<<<<<<<< + * if isinstance(valSet[0], bytes): + * isGoodType = False + */ + } + + /* "PyCafe.pyx":7044 + * #print("isBytesType ", isBytesType) + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) # <<<<<<<<<<<<<< + * class_name = str(self.channelInfo.getClassNameAsString()) + * data_type = self.channelInfo.getDataType() + */ + (void)(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo)); + + /* "PyCafe.pyx":7045 + * + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * class_name = str(self.channelInfo.getClassNameAsString()) # <<<<<<<<<<<<<< + * data_type = self.channelInfo.getDataType() + * + */ + __pyx_t_10 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->channelInfo.getClassNameAsString()); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_class_name = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7046 + * self._c_cafe.getChannelInfo(handle, self.channelInfo) + * class_name = str(self.channelInfo.getClassNameAsString()) + * data_type = self.channelInfo.getDataType() # <<<<<<<<<<<<<< + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + */ + __pyx_v_data_type = __pyx_v_self->channelInfo.getDataType(); + + /* "PyCafe.pyx":7048 + * data_type = self.channelInfo.getDataType() + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: # <<<<<<<<<<<<<< + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + */ + __Pyx_INCREF(__pyx_v_class_name); + __pyx_t_6 = __pyx_v_class_name; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_waveform, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 7048, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_17 = __pyx_v_data_type; + __pyx_t_3 = (((__pyx_t_17 == DBR_CHAR) != 0) != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L24_bool_binop_done:; + if (__pyx_t_2) { + + /* "PyCafe.pyx":7049 + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * elif isinstance(valSet, list): + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L27_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L27_bool_binop_done:; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7050 + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): + * isGoodType = True # <<<<<<<<<<<<<< + * elif isinstance(valSet, list): + * if len(valSet) == 1: + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":7049 + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: + * if isinstance(valSet, (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * elif isinstance(valSet, list): + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":7051 + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + * elif isinstance(valSet, list): # <<<<<<<<<<<<<< + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + */ + __pyx_t_3 = PyList_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7052 + * isGoodType = True + * elif isinstance(valSet, list): + * if len(valSet) == 1: # <<<<<<<<<<<<<< + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7052, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_18 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7053 + * elif isinstance(valSet, list): + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * valSet = valSet[0] + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyUnicode_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L31_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7054 + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True # <<<<<<<<<<<<<< + * valSet = valSet[0] + * + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":7055 + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + * valSet = valSet[0] # <<<<<<<<<<<<<< + * + * if isGoodType: + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_valSet, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7053 + * elif isinstance(valSet, list): + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): # <<<<<<<<<<<<<< + * isGoodType = True + * valSet = valSet[0] + */ + } + + /* "PyCafe.pyx":7052 + * isGoodType = True + * elif isinstance(valSet, list): + * if len(valSet) == 1: # <<<<<<<<<<<<<< + * if isinstance(valSet[0], (str, bytes)): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":7051 + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + * elif isinstance(valSet, list): # <<<<<<<<<<<<<< + * if len(valSet) == 1: + * if isinstance(valSet[0], (str, bytes)): + */ + } + __pyx_L26:; + + /* "PyCafe.pyx":7048 + * data_type = self.channelInfo.getDataType() + * + * if class_name in ['waveform'] and data_type in [DBR_CHAR]: # <<<<<<<<<<<<<< + * if isinstance(valSet, (str, bytes)): + * isGoodType = True + */ + } + + /* "PyCafe.pyx":7057 + * valSet = valSet[0] + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + __pyx_t_3 = (__pyx_v_isGoodType != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7061 + * #print('set method', type(valSet[0])) + * + * nLA = len(valSet) # <<<<<<<<<<<<<< + * + * # Just check on first element if array.array etc.. + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7061, __pyx_L1_error) + __pyx_v_nLA = __pyx_t_18; + + /* "PyCafe.pyx":7064 + * + * # Just check on first element if array.array etc.. + * if not isinstance(valSet, (list)): # <<<<<<<<<<<<<< + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 + */ + __pyx_t_3 = PyList_Check(__pyx_v_valSet); + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7066 + * if not isinstance(valSet, (list)): + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 # <<<<<<<<<<<<<< + * + * for i in range(0, nLA): + */ + __pyx_v_nLA = 1; + + /* "PyCafe.pyx":7064 + * + * # Just check on first element if array.array etc.. + * if not isinstance(valSet, (list)): # <<<<<<<<<<<<<< + * # if isinstance(valSet, (array.array, np.ndarray, cython.view.memoryview, memoryview)): + * nLA = 1 + */ + } + + /* "PyCafe.pyx":7068 + * nLA = 1 + * + * for i in range(0, nLA): # <<<<<<<<<<<<<< + * + * if isinstance(valSet[i], (str, bytes)): + */ + __pyx_t_4 = __pyx_v_nLA; + __pyx_t_19 = __pyx_t_4; + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_19; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":7070 + * for i in range(0, nLA): + * + * if isinstance(valSet[i], (str, bytes)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyUnicode_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L38_bool_binop_done; + } + __pyx_t_1 = PyBytes_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L38_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7071 + * + * if isinstance(valSet[i], (str, bytes)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i], dtypesString): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7072 + * if isinstance(valSet[i], (str, bytes)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING + */ + goto __pyx_L36_break; + + /* "PyCafe.pyx":7070 + * for i in range(0, nLA): + * + * if isinstance(valSet[i], (str, bytes)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7073 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], dtypesString): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesString); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7073, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7074 + * break + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7075 + * elif isinstance(valSet[i], dtypesString): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L36_break; + + /* "PyCafe.pyx":7073 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], dtypesString): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7076 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7077 + * break + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":7076 + * valType = CAFE_STRING + * break + * elif isinstance(valSet[i], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7078 + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesDouble); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7078, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7079 + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":7078 + * elif isinstance(valSet[i], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesDouble)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7080 + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): # <<<<<<<<<<<<<< + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_6, __pyx_v_dtypesFloat); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7080, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7081 + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + */ + __pyx_v_valType = CAFE_FLOAT; + + /* "PyCafe.pyx":7080 + * elif isinstance(valSet[i], (dtypesDouble)): + * valType = CAFE_DOUBLE + * elif isinstance(valSet[i], (dtypesFloat)): # <<<<<<<<<<<<<< + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7082 + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyLong_Check(__pyx_t_6); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L40_bool_binop_done; + } + __pyx_t_1 = PyInt_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L40_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7083 + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":7082 + * elif isinstance(valSet[i], (dtypesFloat)): + * valType = CAFE_FLOAT + * elif isinstance(valSet[i], (long, int)): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7084 + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyNumber_Add(__pyx_v_dtypesInt, __pyx_v_dtypesLongLong); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_8 = PyNumber_Add(__pyx_t_10, __pyx_v_dtypesUChar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_t_6, __pyx_t_8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7084, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7085 + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":7084 + * elif isinstance(valSet[i], (long, int)): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7086 + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): # <<<<<<<<<<<<<< + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7086, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyObject_IsInstance(__pyx_t_8, __pyx_v_dtypesShort); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7086, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7087 + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], dtypesUShort): + * valType = CAFE_USHORT + */ + __pyx_v_valType = CAFE_SHORT; + + /* "PyCafe.pyx":7086 + * elif isinstance(valSet[i], dtypesInt+dtypesLongLong+dtypesUChar): + * valType = CAFE_LONG + * elif isinstance(valSet[i], dtypesShort): # <<<<<<<<<<<<<< + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7088 + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType = CAFE_USHORT + * else: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_8, __pyx_v_dtypesUShort); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7089 + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + * valType = CAFE_USHORT # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_v_valType = CAFE_USHORT; + + /* "PyCafe.pyx":7088 + * elif isinstance(valSet[i], dtypesShort): + * valType = CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType = CAFE_USHORT + * else: + */ + goto __pyx_L37; + } + + /* "PyCafe.pyx":7092 + * else: + * + * print("PyCafe.pyx: We do not cater for type ", # <<<<<<<<<<<<<< + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + */ + /*else*/ { + + /* "PyCafe.pyx":7093 + * + * print("PyCafe.pyx: We do not cater for type ", + * type(valSet[i]), " and thus assume a string") # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":7092 + * else: + * + * print("PyCafe.pyx: We do not cater for type ", # <<<<<<<<<<<<<< + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + */ + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + __Pyx_GIVEREF(__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_8))); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_INCREF(__pyx_kp_u_and_thus_assume_a_string); + __Pyx_GIVEREF(__pyx_kp_u_and_thus_assume_a_string); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_and_thus_assume_a_string); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7092, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":7094 + * print("PyCafe.pyx: We do not cater for type ", + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7095 + * type(valSet[i]), " and thus assume a string") + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * #print(valSet, len(valSet), valType) + */ + goto __pyx_L36_break; + } + __pyx_L37:; + } + __pyx_L36_break:; + + /* "PyCafe.pyx":7101 + * # valSet to vector since + * # coercion from Python not allowed without the GIL + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * + * vecD.reserve(len(valSet)) + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":7103 + * if valType == CAFE_DOUBLE: + * + * vecD.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7103, __pyx_L1_error) + __pyx_v_vecD.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7104 + * + * vecD.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecD.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7104, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7105 + * vecD.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setVDouble(handle, vecD) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecD.push_back(__pyx_t_22); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7105, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7106 + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVDouble(handle, vecD) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7107 + * vecD.push_back(valSet[i]) + * with nogil: + * status = self._c_cafe.setVDouble(handle, vecD) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_FLOAT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVDouble(__pyx_v_handle, __pyx_v_vecD); + } + + /* "PyCafe.pyx":7106 + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVDouble(handle, vecD) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L46; + } + __pyx_L46:; + } + } + + /* "PyCafe.pyx":7101 + * # valSet to vector since + * # coercion from Python not allowed without the GIL + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * + * vecD.reserve(len(valSet)) + */ + break; + case CAFE_FLOAT: + + /* "PyCafe.pyx":7111 + * elif valType == CAFE_FLOAT: + * + * vecF.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7111, __pyx_L1_error) + __pyx_v_vecF.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7112 + * + * vecF.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecF.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7112, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7113 + * vecF.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setVFloat(handle, vecF) + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_t_8); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7113, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecF.push_back(__pyx_t_23); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7113, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7114 + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVFloat(handle, vecF) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7115 + * vecF.push_back(valSet[i]) + * with nogil: + * status = self._c_cafe.setVFloat(handle, vecF) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_LONG: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVFloat(__pyx_v_handle, __pyx_v_vecF); + } + + /* "PyCafe.pyx":7114 + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVFloat(handle, vecF) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L51; + } + __pyx_L51:; + } + } + + /* "PyCafe.pyx":7109 + * status = self._c_cafe.setVDouble(handle, vecD) + * + * elif valType == CAFE_FLOAT: # <<<<<<<<<<<<<< + * + * vecF.reserve(len(valSet)) + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":7119 + * elif valType == CAFE_LONG: + * + * vecI.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7119, __pyx_L1_error) + __pyx_v_vecI.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7120 + * + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecI.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7120, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7121 + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_24 = __Pyx_PyInt_As_dbr_long_t(__pyx_t_8); if (unlikely((__pyx_t_24 == ((dbr_long_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecI.push_back(__pyx_t_24); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7121, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7123 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVLong(handle, vecI) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7124 + * + * with nogil: + * status = self._c_cafe.setVLong(handle, vecI) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_SHORT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVLong(__pyx_v_handle, __pyx_v_vecI); + } + + /* "PyCafe.pyx":7123 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVLong(handle, vecI) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L56; + } + __pyx_L56:; + } + } + + /* "PyCafe.pyx":7117 + * status = self._c_cafe.setVFloat(handle, vecF) + * + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * + * vecI.reserve(len(valSet)) + */ + break; + case CAFE_SHORT: + + /* "PyCafe.pyx":7128 + * elif valType == CAFE_SHORT: + * + * vecShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7128, __pyx_L1_error) + __pyx_v_vecShort.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7129 + * + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecShort.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7129, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7130 + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_25 = __Pyx_PyInt_As_short(__pyx_t_8); if (unlikely((__pyx_t_25 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 7130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecShort.push_back(__pyx_t_25); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7130, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7132 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVShort(handle, vecShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7133 + * + * with nogil: + * status = self._c_cafe.setVShort(handle, vecShort) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_USHORT: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVShort(__pyx_v_handle, __pyx_v_vecShort); + } + + /* "PyCafe.pyx":7132 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVShort(handle, vecShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L61; + } + __pyx_L61:; + } + } + + /* "PyCafe.pyx":7126 + * status = self._c_cafe.setVLong(handle, vecI) + * + * elif valType == CAFE_SHORT: # <<<<<<<<<<<<<< + * + * vecShort.reserve(len(valSet)) + */ + break; + case CAFE_USHORT: + + /* "PyCafe.pyx":7137 + * elif valType == CAFE_USHORT: + * + * vecUShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7137, __pyx_L1_error) + __pyx_v_vecUShort.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7138 + * + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecUShort.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7138, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7139 + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_26 = __Pyx_PyInt_As_unsigned_short(__pyx_t_8); if (unlikely((__pyx_t_26 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 7139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecUShort.push_back(__pyx_t_26); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7139, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7141 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7142 + * + * with nogil: + * status = self._c_cafe.setVUShort(handle, vecUShort) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_CHAR: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVUShort(__pyx_v_handle, __pyx_v_vecUShort); + } + + /* "PyCafe.pyx":7141 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L66; + } + __pyx_L66:; + } + } + + /* "PyCafe.pyx":7135 + * status = self._c_cafe.setVShort(handle, vecShort) + * + * elif valType == CAFE_USHORT: # <<<<<<<<<<<<<< + * + * vecUShort.reserve(len(valSet)) + */ + break; + case CAFE_CHAR: + + /* "PyCafe.pyx":7146 + * elif valType == CAFE_CHAR: + * + * vecChar.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7146, __pyx_L1_error) + __pyx_v_vecChar.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7147 + * + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecChar.push_back(valSet[i]) + * + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7147, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7148 + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_27 = __Pyx_PyInt_As_dbr_char_t(__pyx_t_8); if (unlikely((__pyx_t_27 == ((dbr_char_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecChar.push_back(__pyx_t_27); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7148, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7150 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVChar(handle, vecChar) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7151 + * + * with nogil: + * status = self._c_cafe.setVChar(handle, vecChar) # <<<<<<<<<<<<<< + * + * elif valType == CAFE_STRING: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVChar(__pyx_v_handle, __pyx_v_vecChar); + } + + /* "PyCafe.pyx":7150 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVChar(handle, vecChar) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L71; + } + __pyx_L71:; + } + } + + /* "PyCafe.pyx":7144 + * status = self._c_cafe.setVUShort(handle, vecUShort) + * + * elif valType == CAFE_CHAR: # <<<<<<<<<<<<<< + * + * vecChar.reserve(len(valSet)) + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":7155 + * elif valType == CAFE_STRING: + * + * vecS.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7155, __pyx_L1_error) + __pyx_v_vecS.reserve(__pyx_t_18); + + /* "PyCafe.pyx":7156 + * + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * if isinstance(valSet[i], str): + * #valSet[i] = (valSet[i]).encode('utf_8') + */ + __pyx_t_18 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7156, __pyx_L1_error) + __pyx_t_20 = __pyx_t_18; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { + __pyx_v_i = __pyx_t_21; + + /* "PyCafe.pyx":7157 + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): # <<<<<<<<<<<<<< + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('utf_8') + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyUnicode_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7159 + * if isinstance(valSet[i], str): + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('utf_8') # <<<<<<<<<<<<<< + * elif isinstance(valSet[i], (bytes, bytearray)): + * encoding = False + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7157 + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * if isinstance(valSet[i], str): # <<<<<<<<<<<<<< + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('utf_8') + */ + goto __pyx_L74; + } + + /* "PyCafe.pyx":7160 + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('utf_8') + * elif isinstance(valSet[i], (bytes, bytearray)): # <<<<<<<<<<<<<< + * encoding = False + * if not encoding: + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = PyBytes_Check(__pyx_t_8); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L75_bool_binop_done; + } + __pyx_t_1 = PyByteArray_Check(__pyx_t_8); + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L75_bool_binop_done:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7161 + * temp = (valSet[i]).encode('utf_8') + * elif isinstance(valSet[i], (bytes, bytearray)): + * encoding = False # <<<<<<<<<<<<<< + * if not encoding: + * try: + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":7162 + * elif isinstance(valSet[i], (bytes, bytearray)): + * encoding = False + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_8') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7163 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_30); + /*try:*/ { + + /* "PyCafe.pyx":7164 + * if not encoding: + * try: + * temp = (valSet[i]).decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7164, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7164, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7164, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7165 + * try: + * temp = (valSet[i]).decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * + * vecS.push_back(temp.encode('utf_8')) + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7167 + * encoding = True + * + * vecS.push_back(temp.encode('utf_8')) # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7167, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7167, __pyx_L78_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7167, __pyx_L78_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecS.push_back(__pyx_t_31); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7167, __pyx_L78_error) + } + + /* "PyCafe.pyx":7163 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + goto __pyx_L85_try_end; + __pyx_L78_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":7168 + * + * vecS.push_back(temp.encode('utf_8')) + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L79_exception_handled; + } + goto __pyx_L80_except_error; + __pyx_L80_except_error:; + + /* "PyCafe.pyx":7163 + * encoding = False + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + goto __pyx_L1_error; + __pyx_L79_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + __pyx_L85_try_end:; + } + + /* "PyCafe.pyx":7162 + * elif isinstance(valSet[i], (bytes, bytearray)): + * encoding = False + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_8') + */ + } + + /* "PyCafe.pyx":7170 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_16') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_28); + /*try:*/ { + + /* "PyCafe.pyx":7172 + * if not encoding: + * try: + * temp = (valSet[i]).decode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7172, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7172, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7172, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7173 + * try: + * temp = (valSet[i]).decode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * + * vecS.push_back(temp.encode('utf_16').decode('utf_16')) + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7175 + * encoding = True + * + * vecS.push_back(temp.encode('utf_16').decode('utf_16')) # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7175, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7175, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7175, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7175, __pyx_L87_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7175, __pyx_L87_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecS.push_back(((std::string)__pyx_t_31)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7175, __pyx_L87_error) + } + + /* "PyCafe.pyx":7171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + goto __pyx_L94_try_end; + __pyx_L87_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":7176 + * + * vecS.push_back(temp.encode('utf_16').decode('utf_16')) + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L88_exception_handled; + } + goto __pyx_L89_except_error; + __pyx_L89_except_error:; + + /* "PyCafe.pyx":7171 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + goto __pyx_L1_error; + __pyx_L88_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + __pyx_L94_try_end:; + } + + /* "PyCafe.pyx":7170 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_16') + */ + } + + /* "PyCafe.pyx":7178 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_32') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7179 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_32') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_30); + /*try:*/ { + + /* "PyCafe.pyx":7180 + * if not encoding: + * try: + * temp = (valSet[i]).decode('utf_32') # <<<<<<<<<<<<<< + * encoding = True + * + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7180, __pyx_L96_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7180, __pyx_L96_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_utf_32) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_utf_32); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7180, __pyx_L96_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7181 + * try: + * temp = (valSet[i]).decode('utf_32') + * encoding = True # <<<<<<<<<<<<<< + * + * vecS.push_back(temp.encode('utf_32')) + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7183 + * encoding = True + * + * vecS.push_back(temp.encode('utf_32')) # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7183, __pyx_L96_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_n_u_utf_32) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_u_utf_32); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7183, __pyx_L96_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7183, __pyx_L96_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + try { + __pyx_v_vecS.push_back(__pyx_t_31); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7183, __pyx_L96_error) + } + + /* "PyCafe.pyx":7179 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_32') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + goto __pyx_L103_try_end; + __pyx_L96_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":7184 + * + * vecS.push_back(temp.encode('utf_32')) + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * else: + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L97_exception_handled; + } + goto __pyx_L98_except_error; + __pyx_L98_except_error:; + + /* "PyCafe.pyx":7179 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * temp = (valSet[i]).decode('utf_32') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + goto __pyx_L1_error; + __pyx_L97_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + __pyx_L103_try_end:; + } + + /* "PyCafe.pyx":7178 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * temp = (valSet[i]).decode('utf_32') + */ + } + + /* "PyCafe.pyx":7160 + * #valSet[i] = (valSet[i]).encode('utf_8') + * temp = (valSet[i]).encode('utf_8') + * elif isinstance(valSet[i], (bytes, bytearray)): # <<<<<<<<<<<<<< + * encoding = False + * if not encoding: + */ + goto __pyx_L74; + } + + /* "PyCafe.pyx":7187 + * pass + * else: + * print('utf-none', type(valSet[i])) # <<<<<<<<<<<<<< + * temp = valSet[i] + * vecS.push_back( temp) + */ + /*else*/ { + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_kp_u_utf_none); + __Pyx_GIVEREF(__pyx_kp_u_utf_none); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_utf_none); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_8))); + PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)Py_TYPE(__pyx_t_8))); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":7188 + * else: + * print('utf-none', type(valSet[i])) + * temp = valSet[i] # <<<<<<<<<<<<<< + * vecS.push_back( temp) + * + */ + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":7189 + * print('utf-none', type(valSet[i])) + * temp = valSet[i] + * vecS.push_back( temp) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_v_temp); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7189, __pyx_L1_error) + try { + __pyx_v_vecS.push_back(((std::string)__pyx_t_31)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7189, __pyx_L1_error) + } + } + __pyx_L74:; + } + + /* "PyCafe.pyx":7191 + * vecS.push_back( temp) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVString(handle, vecS) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7192 + * + * with nogil: + * status = self._c_cafe.setVString(handle, vecS) # <<<<<<<<<<<<<< + * + * elif isBytesType: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setVString(__pyx_v_handle, __pyx_v_vecS); + } + + /* "PyCafe.pyx":7191 + * vecS.push_back( temp) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setVString(handle, vecS) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L106; + } + __pyx_L106:; + } + } + + /* "PyCafe.pyx":7153 + * status = self._c_cafe.setVChar(handle, vecChar) + * + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * + * vecS.reserve(len(valSet)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":7057 + * valSet = valSet[0] + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7194 + * status = self._c_cafe.setVString(handle, vecS) + * + * elif isBytesType: # <<<<<<<<<<<<<< + * #print("isBytesType") + * valSetS = valSet.value + */ + __pyx_t_3 = (__pyx_v_isBytesType != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7196 + * elif isBytesType: + * #print("isBytesType") + * valSetS = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_31); + + /* "PyCafe.pyx":7197 + * #print("isBytesType") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7198 + * valSetS = valSet.value + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_char)): + * #print("is ctypes.c_char") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7197 + * #print("isBytesType") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L109; + } + __pyx_L109:; + } + } + + /* "PyCafe.pyx":7194 + * status = self._c_cafe.setVString(handle, vecS) + * + * elif isBytesType: # <<<<<<<<<<<<<< + * #print("isBytesType") + * valSetS = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7199 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): # <<<<<<<<<<<<<< + * #print("is ctypes.c_char") + * # print(valSet.value) + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_c_char); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7203 + * # print(valSet.value) + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_31; + + /* "PyCafe.pyx":7204 + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7205 + * valSetS = valSet.value.decode() + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7204 + * # print(valSet.value.decode()) + * valSetS = valSet.value.decode() + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L112; + } + __pyx_L112:; + } + } + + /* "PyCafe.pyx":7199 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): # <<<<<<<<<<<<<< + * #print("is ctypes.c_char") + * # print(valSet.value) + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7206 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF = valSet.value + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_c_float); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7207 + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7207, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_valSetF = ((float)__pyx_t_23); + + /* "PyCafe.pyx":7208 + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7209 + * valSetF = valSet.value + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setFloat(__pyx_v_handle, __pyx_v_valSetF); + } + + /* "PyCafe.pyx":7208 + * elif isinstance(valSet, (ctypes.c_float)): + * valSetF = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L115; + } + __pyx_L115:; + } + } + + /* "PyCafe.pyx":7206 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF = valSet.value + * with nogil: + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7210 + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD = valSet.value + * with nogil: + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ctypes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_c_double); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_10); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7211 + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetD = ((double)__pyx_t_22); + + /* "PyCafe.pyx":7212 + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7213 + * valSetD = valSet.value + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesInt): + * # print("ctypesInt") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setDouble(__pyx_v_handle, __pyx_v_valSetD); + } + + /* "PyCafe.pyx":7212 + * elif isinstance(valSet, (ctypes.c_double)): + * valSetD = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L118; + } + __pyx_L118:; + } + } + + /* "PyCafe.pyx":7210 + * with nogil: + * status = self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD = valSet.value + * with nogil: + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7214 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * # print("ctypesInt") + * valSetI = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesInt); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7214, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7216 + * elif isinstance(valSet, ctypesInt): + * # print("ctypesInt") + * valSetI = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_10); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetI = ((int)__pyx_t_17); + + /* "PyCafe.pyx":7217 + * # print("ctypesInt") + * valSetI = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7218 + * valSetI = valSet.value + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesLongLong): + * # print("ctypesLongLong") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetI); + } + + /* "PyCafe.pyx":7217 + * # print("ctypesInt") + * valSetI = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L121; + } + __pyx_L121:; + } + } + + /* "PyCafe.pyx":7214 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * # print("ctypesInt") + * valSetI = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7219 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): # <<<<<<<<<<<<<< + * # print("ctypesLongLong") + * valSetLL = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesLongLong); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7219, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7221 + * elif isinstance(valSet, ctypesLongLong): + * # print("ctypesLongLong") + * valSetLL = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_32 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_10); if (unlikely((__pyx_t_32 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetLL = ((PY_LONG_LONG)__pyx_t_32); + + /* "PyCafe.pyx":7222 + * # print("ctypesLongLong") + * valSetLL = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7223 + * valSetLL = valSet.value + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesShort): + * #print("ctypesShort") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetLL); + } + + /* "PyCafe.pyx":7222 + * # print("ctypesLongLong") + * valSetLL = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L124; + } + __pyx_L124:; + } + } + + /* "PyCafe.pyx":7219 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): # <<<<<<<<<<<<<< + * # print("ctypesLongLong") + * valSetLL = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7224 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesShort); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7224, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7226 + * elif isinstance(valSet, ctypesShort): + * #print("ctypesShort") + * valSetShort = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_25 = __Pyx_PyInt_As_short(__pyx_t_10); if (unlikely((__pyx_t_25 == (short)-1) && PyErr_Occurred())) __PYX_ERR(0, 7226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetShort = ((short)__pyx_t_25); + + /* "PyCafe.pyx":7227 + * #print("ctypesShort") + * valSetShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7228 + * valSetShort = valSet.value + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesUShort): + * #print("ctypesUShort") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setShort(__pyx_v_handle, __pyx_v_valSetShort); + } + + /* "PyCafe.pyx":7227 + * #print("ctypesShort") + * valSetShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L127; + } + __pyx_L127:; + } + } + + /* "PyCafe.pyx":7224 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7229 + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): # <<<<<<<<<<<<<< + * #print("ctypesUShort") + * valSetUShort = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesUShort); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7229, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7231 + * elif isinstance(valSet, ctypesUShort): + * #print("ctypesUShort") + * valSetUShort = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_26 = __Pyx_PyInt_As_unsigned_short(__pyx_t_10); if (unlikely((__pyx_t_26 == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 7231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetUShort = ((unsigned short)__pyx_t_26); + + /* "PyCafe.pyx":7232 + * #print("ctypesUShort") + * valSetUShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7233 + * valSetUShort = valSet.value + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (ctypesString)): + * #print("ctypesString") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setUShort(__pyx_v_handle, __pyx_v_valSetUShort); + } + + /* "PyCafe.pyx":7232 + * #print("ctypesUShort") + * valSetUShort = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L130; + } + __pyx_L130:; + } + } + + /* "PyCafe.pyx":7229 + * with nogil: + * status = self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): # <<<<<<<<<<<<<< + * #print("ctypesUShort") + * valSetUShort = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7234 + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS = valSet.value + */ + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesString); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7234, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7236 + * elif isinstance(valSet, (ctypesString)): + * #print("ctypesString") + * valSetS = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7236, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_31); + + /* "PyCafe.pyx":7237 + * #print("ctypesString") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7238 + * valSetS = valSet.value + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, ctypesUChar): + * #print("ctypesUChar") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7237 + * #print("ctypesString") + * valSetS = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L133; + } + __pyx_L133:; + } + } + + /* "PyCafe.pyx":7234 + * with nogil: + * status = self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString)): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7239 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): # <<<<<<<<<<<<<< + * #print("ctypesUChar") + * valSetUChar = valSet.value + */ + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesUChar); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 7239, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7241 + * elif isinstance(valSet, ctypesUChar): + * #print("ctypesUChar") + * valSetUChar = valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_33 = __Pyx_PyInt_As_unsigned_char(__pyx_t_10); if (unlikely((__pyx_t_33 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 7241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetUChar = ((unsigned char)__pyx_t_33); + + /* "PyCafe.pyx":7242 + * #print("ctypesUChar") + * valSetUChar = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7243 + * valSetUChar = valSet.value + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (float)): + * #print("float type") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setChar(__pyx_v_handle, __pyx_v_valSetUChar); + } + + /* "PyCafe.pyx":7242 + * #print("ctypesUChar") + * valSetUChar = valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L136; + } + __pyx_L136:; + } + } + + /* "PyCafe.pyx":7239 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): # <<<<<<<<<<<<<< + * #print("ctypesUChar") + * valSetUChar = valSet.value + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7244 + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD = valSet + */ + __pyx_t_2 = PyFloat_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7246 + * elif isinstance(valSet, (float)): + * #print("float type") + * valSetD = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + */ + __pyx_t_23 = __pyx_PyFloat_AsFloat(__pyx_v_valSet); if (unlikely((__pyx_t_23 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7246, __pyx_L1_error) + __pyx_v_valSetD = ((float)__pyx_t_23); + + /* "PyCafe.pyx":7247 + * #print("float type") + * valSetD = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7248 + * valSetD = valSet + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (int, long)): + * #print("int/long type") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setDouble(__pyx_v_handle, __pyx_v_valSetD); + } + + /* "PyCafe.pyx":7247 + * #print("float type") + * valSetD = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L139; + } + __pyx_L139:; + } + } + + /* "PyCafe.pyx":7244 + * with nogil: + * status = self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD = valSet + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7249 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI = valSet + */ + __pyx_t_2 = PyInt_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L140_bool_binop_done; + } + __pyx_t_1 = PyLong_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L140_bool_binop_done:; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7251 + * elif isinstance(valSet, (int, long)): + * #print("int/long type") + * valSetI = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_v_valSet); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7251, __pyx_L1_error) + __pyx_v_valSetI = ((int)__pyx_t_17); + + /* "PyCafe.pyx":7252 + * #print("int/long type") + * valSetI = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7253 + * valSetI = valSet + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (str)): + * #print("str type", valSet) + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetI); + } + + /* "PyCafe.pyx":7252 + * #print("int/long type") + * valSetI = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L144; + } + __pyx_L144:; + } + } + + /* "PyCafe.pyx":7249 + * with nogil: + * status = self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI = valSet + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7254 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * #print("str type", valSet) + * encoding = False + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7256 + * elif isinstance(valSet, (str)): + * #print("str type", valSet) + * encoding = False # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.encode('utf_8') + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":7257 + * #print("str type", valSet) + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_28); + /*try:*/ { + + /* "PyCafe.pyx":7258 + * encoding = False + * try: + * valSetS = valSet.encode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7258, __pyx_L145_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7258, __pyx_L145_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7258, __pyx_L145_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_31; + + /* "PyCafe.pyx":7259 + * try: + * valSetS = valSet.encode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7257 + * #print("str type", valSet) + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + goto __pyx_L150_try_end; + __pyx_L145_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7260 + * valSetS = valSet.encode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L146_exception_handled; + } + goto __pyx_L147_except_error; + __pyx_L147_except_error:; + + /* "PyCafe.pyx":7257 + * #print("str type", valSet) + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + goto __pyx_L1_error; + __pyx_L146_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + __pyx_L150_try_end:; + } + + /* "PyCafe.pyx":7262 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.encode('utf_16') + */ + __pyx_t_3 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7263 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_30); + /*try:*/ { + + /* "PyCafe.pyx":7264 + * if not encoding: + * try: + * valSetS = valSet.encode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7264, __pyx_L152_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7264, __pyx_L152_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7264, __pyx_L152_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_31; + + /* "PyCafe.pyx":7265 + * try: + * valSetS = valSet.encode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7263 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + goto __pyx_L157_try_end; + __pyx_L152_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7266 + * valSetS = valSet.encode('utf_16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L153_exception_handled; + } + goto __pyx_L154_except_error; + __pyx_L154_except_error:; + + /* "PyCafe.pyx":7263 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.encode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + goto __pyx_L1_error; + __pyx_L153_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + __pyx_L157_try_end:; + } + + /* "PyCafe.pyx":7262 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.encode('utf_16') + */ + } + + /* "PyCafe.pyx":7269 + * pass + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7270 + * + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (bytes, bytearray)): + * #print("bytes,bytearray") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7269 + * pass + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L160; + } + __pyx_L160:; + } + } + + /* "PyCafe.pyx":7254 + * with nogil: + * status = self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * #print("str type", valSet) + * encoding = False + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7271 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * encoding = False + */ + __pyx_t_2 = PyBytes_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L161_bool_binop_done; + } + __pyx_t_1 = PyByteArray_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L161_bool_binop_done:; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7273 + * elif isinstance(valSet, (bytes, bytearray)): + * #print("bytes,bytearray") + * encoding = False # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.decode('utf_8') + */ + __pyx_v_encoding = 0; + + /* "PyCafe.pyx":7274 + * #print("bytes,bytearray") + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_8') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_28); + /*try:*/ { + + /* "PyCafe.pyx":7275 + * encoding = False + * try: + * valSetS = valSet.decode('utf_8') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7275, __pyx_L163_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_n_u_utf_8_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_8_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7275, __pyx_L163_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7275, __pyx_L163_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_31; + + /* "PyCafe.pyx":7276 + * try: + * valSetS = valSet.decode('utf_8') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * pass + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7274 + * #print("bytes,bytearray") + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_8') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + goto __pyx_L168_try_end; + __pyx_L163_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7277 + * valSetS = valSet.decode('utf_8') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_ErrRestore(0,0,0); + goto __pyx_L164_exception_handled; + } + goto __pyx_L165_except_error; + __pyx_L165_except_error:; + + /* "PyCafe.pyx":7274 + * #print("bytes,bytearray") + * encoding = False + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_8') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + goto __pyx_L1_error; + __pyx_L164_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_ExceptionReset(__pyx_t_30, __pyx_t_29, __pyx_t_28); + __pyx_L168_try_end:; + } + + /* "PyCafe.pyx":7279 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.decode('utf_16') + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7280 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_16') + * encoding = True + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30); + __Pyx_XGOTREF(__pyx_t_28); + __Pyx_XGOTREF(__pyx_t_29); + __Pyx_XGOTREF(__pyx_t_30); + /*try:*/ { + + /* "PyCafe.pyx":7281 + * if not encoding: + * try: + * valSetS = valSet.decode('utf_16') # <<<<<<<<<<<<<< + * encoding = True + * except UnicodeDecodeError: + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7281, __pyx_L170_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_n_u_utf_16_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_utf_16_2); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7281, __pyx_L170_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7281, __pyx_L170_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_31); + + /* "PyCafe.pyx":7282 + * try: + * valSetS = valSet.decode('utf_16') + * encoding = True # <<<<<<<<<<<<<< + * except UnicodeDecodeError: + * print('decode utf_16 error') + */ + __pyx_v_encoding = 1; + + /* "PyCafe.pyx":7280 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_16') + * encoding = True + */ + } + __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; + __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0; + __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0; + goto __pyx_L175_try_end; + __pyx_L170_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7283 + * valSetS = valSet.decode('utf_16') + * encoding = True + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * print('decode utf_16 error') + * pass + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); + if (__pyx_t_17) { + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 7283, __pyx_L172_except_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafe.pyx":7284 + * encoding = True + * except UnicodeDecodeError: + * print('decode utf_16 error') # <<<<<<<<<<<<<< + * pass + * except UnicodeEncodeError as ex: + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7284, __pyx_L172_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L171_exception_handled; + } + + /* "PyCafe.pyx":7286 + * print('decode utf_16 error') + * pass + * except UnicodeEncodeError as ex: # <<<<<<<<<<<<<< + * print('encode utf_16 error', ex) + * pass + */ + __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError); + if (__pyx_t_17) { + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 7286, __pyx_L172_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_ex = __pyx_t_6; + /*try:*/ { + + /* "PyCafe.pyx":7287 + * pass + * except UnicodeEncodeError as ex: + * print('encode utf_16 error', ex) # <<<<<<<<<<<<<< + * pass + * if not encoding: + */ + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7287, __pyx_L183_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_encode_utf_16_error); + __Pyx_GIVEREF(__pyx_kp_u_encode_utf_16_error); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_encode_utf_16_error); + __Pyx_INCREF(__pyx_v_ex); + __Pyx_GIVEREF(__pyx_v_ex); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ex); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7287, __pyx_L183_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":7286 + * print('decode utf_16 error') + * pass + * except UnicodeEncodeError as ex: # <<<<<<<<<<<<<< + * print('encode utf_16 error', ex) + * pass + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_ex); + __pyx_v_ex = NULL; + goto __pyx_L184; + } + __pyx_L183_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_36 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0; __pyx_t_40 = 0; __pyx_t_41 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_39, &__pyx_t_40, &__pyx_t_41); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_36, &__pyx_t_37, &__pyx_t_38) < 0)) __Pyx_ErrFetch(&__pyx_t_36, &__pyx_t_37, &__pyx_t_38); + __Pyx_XGOTREF(__pyx_t_36); + __Pyx_XGOTREF(__pyx_t_37); + __Pyx_XGOTREF(__pyx_t_38); + __Pyx_XGOTREF(__pyx_t_39); + __Pyx_XGOTREF(__pyx_t_40); + __Pyx_XGOTREF(__pyx_t_41); + __pyx_t_17 = __pyx_lineno; __pyx_t_34 = __pyx_clineno; __pyx_t_35 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_ex); + __pyx_v_ex = NULL; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_39); + __Pyx_XGIVEREF(__pyx_t_40); + __Pyx_XGIVEREF(__pyx_t_41); + __Pyx_ExceptionReset(__pyx_t_39, __pyx_t_40, __pyx_t_41); + } + __Pyx_XGIVEREF(__pyx_t_36); + __Pyx_XGIVEREF(__pyx_t_37); + __Pyx_XGIVEREF(__pyx_t_38); + __Pyx_ErrRestore(__pyx_t_36, __pyx_t_37, __pyx_t_38); + __pyx_t_36 = 0; __pyx_t_37 = 0; __pyx_t_38 = 0; __pyx_t_39 = 0; __pyx_t_40 = 0; __pyx_t_41 = 0; + __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_34; __pyx_filename = __pyx_t_35; + goto __pyx_L172_except_error; + } + __pyx_L184:; + } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L171_exception_handled; + } + goto __pyx_L172_except_error; + __pyx_L172_except_error:; + + /* "PyCafe.pyx":7280 + * pass + * if not encoding: + * try: # <<<<<<<<<<<<<< + * valSetS = valSet.decode('utf_16') + * encoding = True + */ + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + goto __pyx_L1_error; + __pyx_L171_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_28); + __Pyx_XGIVEREF(__pyx_t_29); + __Pyx_XGIVEREF(__pyx_t_30); + __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); + __pyx_L175_try_end:; + } + + /* "PyCafe.pyx":7279 + * except UnicodeDecodeError: + * pass + * if not encoding: # <<<<<<<<<<<<<< + * try: + * valSetS = valSet.decode('utf_16') + */ + } + + /* "PyCafe.pyx":7289 + * print('encode utf_16 error', ex) + * pass + * if not encoding: # <<<<<<<<<<<<<< + * print('no encoding done') + * valSetS = valSet + */ + __pyx_t_2 = ((!(__pyx_v_encoding != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7290 + * pass + * if not encoding: + * print('no encoding done') # <<<<<<<<<<<<<< + * valSetS = valSet + * with nogil: + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7291 + * if not encoding: + * print('no encoding done') + * valSetS = valSet # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_v_valSet); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7291, __pyx_L1_error) + __pyx_v_valSetS = ((std::string)__pyx_t_31); + + /* "PyCafe.pyx":7289 + * print('encode utf_16 error', ex) + * pass + * if not encoding: # <<<<<<<<<<<<<< + * print('no encoding done') + * valSetS = valSet + */ + } + + /* "PyCafe.pyx":7292 + * print('no encoding done') + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7293 + * valSetS = valSet + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (unicode)): + * #print("unicode") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7292 + * print('no encoding done') + * valSetS = valSet + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L192; + } + __pyx_L192:; + } + } + + /* "PyCafe.pyx":7271 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes, bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * encoding = False + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7294 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS = valSet.encode('utf-8') + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7296 + * elif isinstance(valSet, (unicode)): + * #print("unicode") + * valSetS = valSet.encode('utf-8') # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_8); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_31 = __pyx_convert_string_from_py_std__in_string(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7296, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_valSetS = __pyx_t_31; + + /* "PyCafe.pyx":7297 + * #print("unicode") + * valSetS = valSet.encode('utf-8') + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * else: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7298 + * valSetS = valSet.encode('utf-8') + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) # <<<<<<<<<<<<<< + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setString(__pyx_v_handle, __pyx_v_valSetS); + } + + /* "PyCafe.pyx":7297 + * #print("unicode") + * valSetS = valSet.encode('utf-8') + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setString(handle, valSetS) + * else: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L195; + } + __pyx_L195:; + } + } + + /* "PyCafe.pyx":7294 + * with nogil: + * status = self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS = valSet.encode('utf-8') + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":7300 + * status = self._c_cafe.setString(handle, valSetS) + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") # <<<<<<<<<<<<<< + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7301 + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ # <<<<<<<<<<<<<< + * or not) should be of of type , or ") + * type(valSet) + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafe.pyx":7303 + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + * type(valSet) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + (void)(((PyObject *)Py_TYPE(__pyx_v_valSet))); + } + __pyx_L33:; + + /* "PyCafe.pyx":7305 + * type(valSet) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7306 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7307 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + __pyx_t_3 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7308 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * else: + * self._c_cafe.printStatus(handle, status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7307 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L198; + } + + /* "PyCafe.pyx":7310 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L198:; + + /* "PyCafe.pyx":7306 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7311 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + __pyx_t_3 = (__pyx_v_self->_enable_exceptions != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7312 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_10 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_6) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv_name, __pyx_t_6) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7313 + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_code, __pyx_t_6) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_text, __pyx_t_6) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_status)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_t_6) < 0) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7312 + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), # <<<<<<<<<<<<<< + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7314 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * return status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7314, __pyx_L1_error) + + /* "PyCafe.pyx":7311 + * else: + * self._c_cafe.printStatus(handle, status) + * if self._enable_exceptions: # <<<<<<<<<<<<<< + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, _handle=handle, _pv_name=self._c_cafe.getPVFromHandle(handle), + * _error_code=status, _error_text=self.cs.code(status), _error_info=self.cs.info(status)) + */ + } + + /* "PyCafe.pyx":7305 + * type(valSet) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":7316 + * raise _cafeException + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * # END def set(self, handlePV, valSet): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":6914 + * ############################################################################## + * + * def set(self, handlePV, valSet): # <<<<<<<<<<<<<< + * cdef str _METHOD = "set(handlePV, valSet)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_AddTraceback("PyCafe.CyCafe.set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_ctypesString); + __Pyx_XDECREF(__pyx_v_ctypesUChar); + __Pyx_XDECREF(__pyx_v_ctypesShort); + __Pyx_XDECREF(__pyx_v_ctypesUShort); + __Pyx_XDECREF(__pyx_v_ctypesInt); + __Pyx_XDECREF(__pyx_v_ctypesLongLong); + __Pyx_XDECREF(__pyx_v_dtypesString); + __Pyx_XDECREF(__pyx_v_dtypesUChar); + __Pyx_XDECREF(__pyx_v_dtypesShort); + __Pyx_XDECREF(__pyx_v_dtypesUShort); + __Pyx_XDECREF(__pyx_v_dtypesInt); + __Pyx_XDECREF(__pyx_v_dtypesLongLong); + __Pyx_XDECREF(__pyx_v_dtypesFloat); + __Pyx_XDECREF(__pyx_v_dtypesDouble); + __Pyx_XDECREF(__pyx_v_classType); + __Pyx_XDECREF(__pyx_v_substringmv); + __Pyx_XDECREF(__pyx_v_class_name); + __Pyx_XDECREF(__pyx_v_temp); + __Pyx_XDECREF(__pyx_v_ex); + __Pyx_XDECREF(__pyx_v_valSet); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7323 + * ############################################################################ + * + * def setScalarList(self, list handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setScalarList" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_401setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_401setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_valList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setScalarList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_valList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setScalarList", 1, 2, 2, 1); __PYX_ERR(0, 7323, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScalarList") < 0)) __PYX_ERR(0, 7323, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = ((PyObject*)values[0]); + __pyx_v_valList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setScalarList", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7323, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handleList), (&PyList_Type), 1, "handleList", 1))) __PYX_ERR(0, 7323, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valList), (&PyList_Type), 1, "valList", 1))) __PYX_ERR(0, 7323, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_400setScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_valList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_400setScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_valList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_nelemPrevious = NULL; + CYTHON_UNUSED unsigned int __pyx_v_nelemTotal; + Py_ssize_t __pyx_v_i; + std::vector __pyx_v_v; + PVDataHolder *__pyx_v_pvd; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + std::string __pyx_t_14; + double __pyx_t_15; + int __pyx_t_16; + unsigned int __pyx_t_17; + __Pyx_RefNannySetupContext("setScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":7324 + * + * def setScalarList(self, list handleList, list valList): + * cdef str _METHOD = "setScalarList" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_n_u_setScalarList); + __pyx_v__METHOD = __pyx_n_u_setScalarList; + + /* "PyCafe.pyx":7327 + * + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7327, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7328 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7328, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 7328, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":7327 + * + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7329 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + * First input argument, should be a 'list' of of type \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7329, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_Check(__pyx_t_1); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_3 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_1); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7330 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type \ + * if handles or if PVs") + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 7330, __pyx_L1_error) + + /* "PyCafe.pyx":7329 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ + * First input argument, should be a 'list' of of type \ + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":7334 + * if handles or if PVs") + * + * if len(handleList) != len(valList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7334, __pyx_L1_error) + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7334, __pyx_L1_error) + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7334, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7334, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_7 != __pyx_t_8) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7336 + * if len(handleList) != len(valList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ # <<<<<<<<<<<<<< + * the length of data list ", len(valList)) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7336, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7336, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "PyCafe.pyx":7337 + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + * the length of data list ", len(valList)) # <<<<<<<<<<<<<< + * + * nelemPrevious = [] + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7337, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7337, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":7335 + * + * if len(handleList) != len(valList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ # <<<<<<<<<<<<<< + * Length of handle list ", len(handleList), " does not match \ + * the length of data list ", len(valList)) + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_does_not_match_the_length_of_da); + __Pyx_GIVEREF(__pyx_kp_u_does_not_match_the_length_of_da); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_does_not_match_the_length_of_da); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7335, __pyx_L1_error) + + /* "PyCafe.pyx":7334 + * if handles or if PVs") + * + * if len(handleList) != len(valList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \ + * Length of handle list ", len(handleList), " does not match \ + */ + } + + /* "PyCafe.pyx":7339 + * the length of data list ", len(valList)) + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * # Better with PVDataHolder + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7342 + * + * # Better with PVDataHolder + * cdef unsigned int nelemTotal = 0 # <<<<<<<<<<<<<< + * for i in range(0, len(handleList)): + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + */ + __pyx_v_nelemTotal = 0; + + /* "PyCafe.pyx":7343 + * # Better with PVDataHolder + * cdef unsigned int nelemTotal = 0 + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + * nelemPrevious.append(self.hh.getNelemClient(handleList[i])) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7343, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7343, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7345 + * for i in range(0, len(handleList)): + * # nelemTotal+=self.hh.getNelemNative(handleList[i]) + * nelemPrevious.append(self.hh.getNelemClient(handleList[i])) # <<<<<<<<<<<<<< + * + * # cdef int size_cdu = sizeof(CAFE_DATATYPE_UNION) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7345, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getNelemClient(__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_4); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":7351 + * # do this to avoid compiler warning messages + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7351, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7351, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7352 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Create temporary group from handleList + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7352, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7352, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7356 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * # cdef PVDataHolder * pvd = malloc( 100000000 + \ + */ + __pyx_v_pvd = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":7361 + * # len(handleList) * sizeof(PVDataHolder) + nelemTotal*size_cdu) + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * # pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_13; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":7364 + * # pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * #cdef unsigned short valType = CAFE_STRING + */ + (void)((__pyx_v_pvd[__pyx_v_i]).setNelem(1)); + } + + /* "PyCafe.pyx":7368 + * #cdef unsigned short valType = CAFE_STRING + * + * for i in range(0, v.size()): #len(handleList)): # <<<<<<<<<<<<<< + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + */ + __pyx_t_12 = ((int)__pyx_v_v.size()); + __pyx_t_13 = __pyx_t_12; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_13; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":7369 + * + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): # <<<<<<<<<<<<<< + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7369, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7370 + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) # <<<<<<<<<<<<<< + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7370, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setString(__pyx_t_14)); + + /* "PyCafe.pyx":7369 + * + * for i in range(0, v.size()): #len(handleList)): + * if isinstance(valList[i], (str)): # <<<<<<<<<<<<<< + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":7371 + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): # <<<<<<<<<<<<<< + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7371, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyFloat_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7372 + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) # <<<<<<<<<<<<<< + * elif isinstance(valList[i], (long, int)): + * pvd[i].setInt(valList[i]) + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7372, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setDouble(__pyx_t_15)); + + /* "PyCafe.pyx":7371 + * if isinstance(valList[i], (str)): + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i], (float)): # <<<<<<<<<<<<<< + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":7373 + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): # <<<<<<<<<<<<<< + * pvd[i].setInt(valList[i]) + * else: + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7373, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_3 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_3 = (__pyx_t_6 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L16_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7374 + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): + * pvd[i].setInt(valList[i]) # <<<<<<<<<<<<<< + * else: + * print("This line in PyCafe def setScalarList should never appear!") + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7374, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvd[__pyx_v_i]).setInt(__pyx_t_16)); + + /* "PyCafe.pyx":7373 + * elif isinstance(valList[i], (float)): + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i], (long, int)): # <<<<<<<<<<<<<< + * pvd[i].setInt(valList[i]) + * else: + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":7376 + * pvd[i].setInt(valList[i]) + * else: + * print("This line in PyCafe def setScalarList should never appear!") # <<<<<<<<<<<<<< + * + * cdef int status = ICAFE_NORMAL + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_L15:; + } + + /* "PyCafe.pyx":7378 + * print("This line in PyCafe def setScalarList should never appear!") + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setPVArray(v, pvd) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7379 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7380 + * cdef int status = ICAFE_NORMAL + * with nogil: + * status = self._c_cafe.setPVArray(v, pvd) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setPVArray(__pyx_v_v, __pyx_v_pvd); + } + + /* "PyCafe.pyx":7379 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L20; + } + __pyx_L20:; + } + } + + /* "PyCafe.pyx":7382 + * status = self._c_cafe.setPVArray(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7382, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7382, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7383 + * + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_nelemPrevious, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_NeObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 7383, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_3) { + + /* "PyCafe.pyx":7385 + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * # return status for individual channels + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7385, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_nelemPrevious, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7384 + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious( # <<<<<<<<<<<<<< + * handleList[i], nelemPrevious[i]) + * + */ + (void)(__pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_10, __pyx_t_17)); + + /* "PyCafe.pyx":7383 + * + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious( + * handleList[i], nelemPrevious[i]) + */ + } + } + + /* "PyCafe.pyx":7388 + * + * # return status for individual channels + * statusList = [] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7390 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7391 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7392 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7391 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":7390 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7394 + * self._c_cafe.printStatusMessage(status) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7394, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7394, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7395 + * + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7396 + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7396, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":7397 + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7397, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_17 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_17 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":7396 + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7398 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7399 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * print("") + * statusList.append(pvd[i].getStatus()) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":7400 + * print("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7395 + * + * for i in range(0, len(handleList)): + * if (pvd[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + + /* "PyCafe.pyx":7401 + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print("") + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * # free(pvd) + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_4); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 7401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":7405 + * # free(pvd) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_statusList); + __pyx_t_4 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7323 + * ############################################################################ + * + * def setScalarList(self, list handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setScalarList" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.setScalarList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_nelemPrevious); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7410 + * + * ################################################################################## + * def setCompoundList(self, handleList, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_403setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_403setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_vectorList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setCompoundList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__pyx_n_s_vectorList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setCompoundList", 1, 2, 2, 1); __PYX_ERR(0, 7410, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompoundList") < 0)) __PYX_ERR(0, 7410, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handleList = values[0]; + __pyx_v_vectorList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setCompoundList", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7410, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vectorList), (&PyList_Type), 1, "vectorList", 1))) __PYX_ERR(0, 7410, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_402setCompoundList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __pyx_v_vectorList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_402setCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_vectorList) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_v; + int __pyx_v_i; + PVDataHolder *__pyx_v_pvdata; + CAFE_DATATYPE __pyx_v_valType; + long __pyx_v_k; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + unsigned int __pyx_t_10; + std::string __pyx_t_11; + double __pyx_t_12; + int __pyx_t_13; + Py_ssize_t __pyx_t_14; + long __pyx_t_15; + std::vector __pyx_t_16; + std::vector __pyx_t_17; + std::vector __pyx_t_18; + int __pyx_t_19; + __Pyx_RefNannySetupContext("setCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":7412 + * def setCompoundList(self, handleList, list vectorList): + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" # <<<<<<<<<<<<<< + * + * if isinstance(handleList, (str)): + */ + __Pyx_INCREF(__pyx_kp_u_setCompoundList_handleList_list); + __pyx_v__METHOD = __pyx_kp_u_setCompoundList_handleList_list; + + /* "PyCafe.pyx":7414 + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_handleList); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7415 + * + * if isinstance(handleList, (str)): + * handleList = self.getHandlesFromWithinGroup(handleList) # <<<<<<<<<<<<<< + * else: + * if not isinstance(handleList, (list)): + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getHandlesFromWithinGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":7414 + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7417 + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + /*else*/ { + __pyx_t_2 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7418 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7418, __pyx_L1_error) + + /* "PyCafe.pyx":7417 + * handleList = self.getHandlesFromWithinGroup(handleList) + * else: + * if not isinstance(handleList, (list)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be of handles or PVs") + */ + } + + /* "PyCafe.pyx":7421 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Check(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7422 + * + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_handleList) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":7421 + * First input argument, should be of handles or PVs") + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L5; + } + + /* "PyCafe.pyx":7423 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyInt_Check(__pyx_t_3); + __pyx_t_6 = (__pyx_t_1 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = PyLong_Check(__pyx_t_3); + __pyx_t_1 = (__pyx_t_6 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L6_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7424 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7424, __pyx_L1_error) + + /* "PyCafe.pyx":7423 + * if isinstance(handleList[0], (str)): + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * First input argument, should be a 'list' of of type if handles or if PVs") + */ + } + __pyx_L5:; + + /* "PyCafe.pyx":7427 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if len(handleList) != len(vectorList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + */ + __pyx_t_7 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7427, __pyx_L1_error) + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7427, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7427, __pyx_L1_error) + __pyx_t_1 = ((__pyx_t_7 != __pyx_t_8) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7429 + * if len(handleList) != len(vectorList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) # <<<<<<<<<<<<<< + * + * # do this to avoid compiler warning messages + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7429, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7429, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7429, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":7428 + * + * if len(handleList) != len(vectorList): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ # <<<<<<<<<<<<<< + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + * + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_does_not_match_the_length_of_da_2); + __Pyx_GIVEREF(__pyx_kp_u_does_not_match_the_length_of_da_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_does_not_match_the_length_of_da_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7428, __pyx_L1_error) + + /* "PyCafe.pyx":7427 + * First input argument, should be a 'list' of of type if handles or if PVs") + * + * if len(handleList) != len(vectorList): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \ + * Length of handle list ", len(handleList), " does not match the length of data list ", len(vectorList)) + */ + } + } + __pyx_L3:; + + /* "PyCafe.pyx":7435 + * cdef int i + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7435, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7436 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * # Create temporary group from handleList + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7436, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7440 + * # Create temporary group from handleList + * # Does group exist? + * cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * for i in range(0, len(vectorList)): + */ + __pyx_v_pvdata = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":7442 + * cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) + * + * for i in range(0, len(vectorList)): # <<<<<<<<<<<<<< + * + * # if not list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7442, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7442, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7445 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7445, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7446 + * # if not list + * if isinstance(vectorList[i], (str)): + * pvdata[i].setString(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (float)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7446, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7446, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7446, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_11)); + + /* "PyCafe.pyx":7445 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":7448 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7448, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyFloat_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7449 + * + * elif isinstance(vectorList[i], (float)): + * pvdata[i].setDouble(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7449, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_12)); + + /* "PyCafe.pyx":7448 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":7451 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7451, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7452 + * + * elif isinstance(vectorList[i], (long, int)): + * pvdata[i].setInt(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (list)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7452, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7452, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7452, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_13)); + + /* "PyCafe.pyx":7451 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":7454 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7454, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyList_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7457 + * + * # if list + * valType = CAFE_INVALID_DATATYPE # <<<<<<<<<<<<<< + * pvdata[i].setNelem(len(vectorList[i])) + * # for k in range(0, len(vectorList[i])): + */ + __pyx_v_valType = CAFE_INVALID_DATATYPE; + + /* "PyCafe.pyx":7458 + * # if list + * valType = CAFE_INVALID_DATATYPE + * pvdata[i].setNelem(len(vectorList[i])) # <<<<<<<<<<<<<< + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7458, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7458, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_14)); + + /* "PyCafe.pyx":7461 + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 # <<<<<<<<<<<<<< + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + */ + for (__pyx_t_15 = 0; __pyx_t_15 < 1; __pyx_t_15+=1) { + __pyx_v_k = __pyx_t_15; + + /* "PyCafe.pyx":7462 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7462, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PyUnicode_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7463 + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(vectorList[i][k], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7464 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L17_break; + + /* "PyCafe.pyx":7462 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":7465 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7465, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = PyFloat_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7466 + * break + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":7465 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + goto __pyx_L18; + } + + /* "PyCafe.pyx":7467 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7467, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyLong_Check(__pyx_t_5); + __pyx_t_6 = (__pyx_t_2 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_1 = __pyx_t_6; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_6 = PyInt_Check(__pyx_t_5); + __pyx_t_2 = (__pyx_t_6 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L19_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7468 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + __pyx_t_2 = ((__pyx_v_valType != CAFE_DOUBLE) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7469 + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * else: + * valType = CAFE_STRING + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":7468 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + goto __pyx_L21; + } + + /* "PyCafe.pyx":7471 + * valType = CAFE_LONG + * else: + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7472 + * else: + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * # check dt of first element + */ + goto __pyx_L17_break; + } + __pyx_L21:; + + /* "PyCafe.pyx":7467 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + } + __pyx_L18:; + } + __pyx_L17_break:; + + /* "PyCafe.pyx":7475 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":7476 + * # check dt of first element + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7476, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __pyx_convert_vector_from_py_double(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_16)); + + /* "PyCafe.pyx":7475 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":7478 + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7478, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __pyx_convert_vector_from_py_int(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7478, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_17)); + + /* "PyCafe.pyx":7477 + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":7480 + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7480, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_18 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7480, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_18)); + + /* "PyCafe.pyx":7479 + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":7454 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":7483 + * + * else: + * print("This line in PyCafe def setCompoundList should never appear!") # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * Unknown data input; should be one of of type , , , ") + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7484 + * else: + * print("This line in PyCafe def setCompoundList should never appear!") + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 7484, __pyx_L1_error) + } + __pyx_L13:; + } + + /* "PyCafe.pyx":7489 + * # endForLoop + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * with nogil: + * status = self._c_cafe.setPVArray(v, pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7490 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvdata) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7491 + * cdef int status = ICAFE_NORMAL + * with nogil: + * status = self._c_cafe.setPVArray(v, pvdata) # <<<<<<<<<<<<<< + * + * # return status for individual channels + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setPVArray(__pyx_v_v, __pyx_v_pvdata); + } + + /* "PyCafe.pyx":7490 + * + * cdef int status = ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setPVArray(v, pvdata) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L24; + } + __pyx_L24:; + } + } + + /* "PyCafe.pyx":7494 + * + * # return status for individual channels + * statusList = [] # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7496 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7497 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7498 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7497 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":7496 + * statusList = [] + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7500 + * self._c_cafe.printStatusMessage(status) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7500, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":7501 + * + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + __pyx_t_2 = (((__pyx_v_pvdata[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7502 + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + + /* "PyCafe.pyx":7503 + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) # <<<<<<<<<<<<<< + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v_self->hh.getPVFromHandle(__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":7502 + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): + * print("Handle=", handleList[i], "PV=", # <<<<<<<<<<<<<< + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + */ + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_kp_u_Handle); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Handle); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_kp_u_PV_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_PV_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7504 + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + * print("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvdata[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_kp_u_with_error_status); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_with_error_status); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7505 + * self.hh.getPVFromHandle(handleList[i])) + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvdata[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":7506 + * print("with error status=", pvdata[i].getStatus()) + * self._c_cafe.printStatusMessage(pvdata[i].getStatus()) + * print("") # <<<<<<<<<<<<<< + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + * statusList.append(pvdata[i].getStatus()) + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7501 + * + * for i in range(0, len(handleList)): + * if (pvdata[i].getStatus() != ICAFE_NORMAL): # <<<<<<<<<<<<<< + * print("Handle=", handleList[i], "PV=", + * self.hh.getPVFromHandle(handleList[i])) + */ + } + + /* "PyCafe.pyx":7508 + * print("") + * #raise Exception("EXCEPTION RAISED in PyCafe def setCompoundList. Status = %d" %status) + * statusList.append(pvdata[i].getStatus()) # <<<<<<<<<<<<<< + * + * return status, statusList + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvdata[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_4); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 7508, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":7510 + * statusList.append(pvdata[i].getStatus()) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_statusList); + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7410 + * + * ################################################################################## + * def setCompoundList(self, handleList, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setCompoundList(handleList, list vectorList)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.CyCafe.setCompoundList", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7515 + * + * ################################################################################## + * def setGroup(self, ghandleName, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_405setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_405setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_vectorList = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setGroup (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ghandleName,&__pyx_n_s_vectorList,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGroup", 1, 2, 2, 1); __PYX_ERR(0, 7515, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGroup") < 0)) __PYX_ERR(0, 7515, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_ghandleName = values[0]; + __pyx_v_vectorList = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7515, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vectorList), (&PyList_Type), 1, "vectorList", 1))) __PYX_ERR(0, 7515, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_404setGroup(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_vectorList); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_404setGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_vectorList) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PVGroup __pyx_v_pvg; + PVDataHolder *__pyx_v_pvdata; + Py_ssize_t __pyx_v_i; + CAFE_DATATYPE __pyx_v_valType; + long __pyx_v_k; + int __pyx_v_status; + PyObject *__pyx_v_statusList = NULL; + PVDataHolder *__pyx_v_pvd; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + std::string __pyx_t_11; + double __pyx_t_12; + int __pyx_t_13; + Py_ssize_t __pyx_t_14; + long __pyx_t_15; + std::vector __pyx_t_16; + std::vector __pyx_t_17; + std::vector __pyx_t_18; + unsigned int __pyx_t_19; + int __pyx_t_20; + __Pyx_RefNannySetupContext("setGroup", 0); + + /* "PyCafe.pyx":7517 + * def setGroup(self, ghandleName, list vectorList): + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_setGroup_self_ghandleName_list_v); + __pyx_v__METHOD = __pyx_kp_u_setGroup_self_ghandleName_list_v; + + /* "PyCafe.pyx":7519 + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + * + * cdef unsigned int ghandle = 0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":7520 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_ghandleName); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_ghandleName); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7521 + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_ghandleName); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7521, __pyx_L1_error) + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":7520 + * + * cdef unsigned int ghandle = 0 + * if isinstance(ghandleName, (int, long)): # <<<<<<<<<<<<<< + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7522 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7523 + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): + * ghandle = self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ghandleName) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ghandleName); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":7522 + * if isinstance(ghandleName, (int, long)): + * ghandle = ghandleName + * elif isinstance(ghandleName, (str)): # <<<<<<<<<<<<<< + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7525 + * ghandle = self.checkForGroupHandle(ghandleName) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument should be of type if group handle, else if group name") + * raise _cafeException + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7525, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7525, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_11) < 0) __PYX_ERR(0, 7525, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7527 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument should be of type if group handle, else if group name") + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef PVGroup pvg + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7527, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7531 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7532 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * ### + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + */ + (void)(__pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg)); + } + + /* "PyCafe.pyx":7531 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":7536 + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + * + * cdef PVDataHolder * pvdata = pvg.getPVData() # <<<<<<<<<<<<<< + * + * for i in range(0, len(vectorList)): + */ + __pyx_v_pvdata = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":7538 + * cdef PVDataHolder * pvdata = pvg.getPVData() + * + * for i in range(0, len(vectorList)): # <<<<<<<<<<<<<< + * + * # if not list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7538, __pyx_L1_error) + } + __pyx_t_8 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7538, __pyx_L1_error) + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":7541 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7541, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyUnicode_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7542 + * # if not list + * if isinstance(vectorList[i], (str)): + * pvdata[i].setString(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (float)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7542, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7542, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_11)); + + /* "PyCafe.pyx":7541 + * + * # if not list + * if isinstance(vectorList[i], (str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":7544 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7544, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7544, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7545 + * + * elif isinstance(vectorList[i], (float)): + * pvdata[i].setDouble(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7545, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7545, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_12)); + + /* "PyCafe.pyx":7544 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i], (float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":7547 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7547, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyLong_Check(__pyx_t_6); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L12_bool_binop_done:; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7548 + * + * elif isinstance(vectorList[i], (long, int)): + * pvdata[i].setInt(vectorList[i]) # <<<<<<<<<<<<<< + * + * elif isinstance(vectorList[i], (list)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7548, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7548, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_13)); + + /* "PyCafe.pyx":7547 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i], (long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":7550 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7550, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyList_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7553 + * + * # if list + * valType = CAFE_INVALID_DATATYPE # <<<<<<<<<<<<<< + * pvdata[i].setNelem(len(vectorList[i])) + * # for k in range(0, len(vectorList[i])): + */ + __pyx_v_valType = CAFE_INVALID_DATATYPE; + + /* "PyCafe.pyx":7554 + * # if list + * valType = CAFE_INVALID_DATATYPE + * pvdata[i].setNelem(len(vectorList[i])) # <<<<<<<<<<<<<< + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7554, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7554, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_14)); + + /* "PyCafe.pyx":7557 + * # for k in range(0, len(vectorList[i])): + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 # <<<<<<<<<<<<<< + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + */ + for (__pyx_t_15 = 0; __pyx_t_15 < 1; __pyx_t_15+=1) { + __pyx_v_k = __pyx_t_15; + + /* "PyCafe.pyx":7558 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7558, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = PyUnicode_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7559 + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(vectorList[i][k], (float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7560 + * if isinstance(vectorList[i][k], (str)): + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + */ + goto __pyx_L15_break; + + /* "PyCafe.pyx":7558 + * # Just check on first element + * for k in range(0, 1): # can expand this to all elemnts or reduce to 1 + * if isinstance(vectorList[i][k], (str)): # <<<<<<<<<<<<<< + * valType = CAFE_STRING + * break + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":7561 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7561, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = PyFloat_Check(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7562 + * break + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":7561 + * valType = CAFE_STRING + * break + * elif isinstance(vectorList[i][k], (float)): # <<<<<<<<<<<<<< + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":7563 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7563, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyLong_Check(__pyx_t_5); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_t_5); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L17_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7564 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + __pyx_t_2 = ((__pyx_v_valType != CAFE_DOUBLE) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7565 + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG # <<<<<<<<<<<<<< + * else: + * valType = CAFE_STRING + */ + __pyx_v_valType = CAFE_LONG; + + /* "PyCafe.pyx":7564 + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType = CAFE_LONG + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":7567 + * valType = CAFE_LONG + * else: + * valType = CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":7568 + * else: + * valType = CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * # check dt of first element + */ + goto __pyx_L15_break; + } + __pyx_L19:; + + /* "PyCafe.pyx":7563 + * elif isinstance(vectorList[i][k], (float)): + * valType = CAFE_DOUBLE + * elif isinstance(vectorList[i][k], (long, int)): # <<<<<<<<<<<<<< + * if valType != CAFE_DOUBLE: + * valType = CAFE_LONG + */ + } + __pyx_L16:; + } + __pyx_L15_break:; + + /* "PyCafe.pyx":7571 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + switch (__pyx_v_valType) { + case CAFE_DOUBLE: + + /* "PyCafe.pyx":7572 + * # check dt of first element + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7572, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __pyx_convert_vector_from_py_double(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7572, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_16)); + + /* "PyCafe.pyx":7571 + * + * # check dt of first element + * if valType == CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + */ + break; + case CAFE_LONG: + + /* "PyCafe.pyx":7574 + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) # <<<<<<<<<<<<<< + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7574, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __pyx_convert_vector_from_py_int(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7574, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_17)); + + /* "PyCafe.pyx":7573 + * if valType == CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType == CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + */ + break; + case CAFE_STRING: + + /* "PyCafe.pyx":7576 + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: + * pvdata[i].setVString(vectorList[i]) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7576, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7576, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_18 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7576, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (void)((__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_18)); + + /* "PyCafe.pyx":7575 + * elif valType == CAFE_LONG: + * pvdata[i].setVInt(vectorList[i]) + * elif valType == CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":7550 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * # if list + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":7580 + * else: + * + * print("PyCafe def setGroup: Unusual data type for element", # <<<<<<<<<<<<<< + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + */ + /*else*/ { + + /* "PyCafe.pyx":7581 + * + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + * Unknown data input; should be one of of type , , , ") + */ + __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7581, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7580 + * else: + * + * print("PyCafe def setGroup: Unusual data type for element", # <<<<<<<<<<<<<< + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ + */ + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + __Pyx_GIVEREF(__pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u__130); + __Pyx_GIVEREF(__pyx_kp_u__130); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__130); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_6))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_6))); + PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)Py_TYPE(__pyx_t_6))); + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7582 + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 7582, __pyx_L1_error) + } + __pyx_L11:; + } + + /* "PyCafe.pyx":7587 + * # endForLoop + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * statusList = [] + * pvg.setPVData(pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7588 + * + * cdef int status = ICAFE_NORMAL + * statusList = [] # <<<<<<<<<<<<<< + * pvg.setPVData(pvdata) + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7589 + * cdef int status = ICAFE_NORMAL + * statusList = [] + * pvg.setPVData(pvdata) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_pvg.setPVData(__pyx_v_pvdata); + + /* "PyCafe.pyx":7591 + * pvg.setPVData(pvdata) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupSet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7592 + * + * with nogil: + * status = self._c_cafe.groupSet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupSet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":7591 + * pvg.setPVData(pvdata) + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.groupSet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L22; + } + __pyx_L22:; + } + } + + /* "PyCafe.pyx":7596 + * cdef PVDataHolder * pvd + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7597 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7598 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * # do not raise exception + * #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7597 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * # do not raise exception + */ + } + + /* "PyCafe.pyx":7602 + * #raise Exception("EXCEPTION RAISED in PyCafe def setGroup. Status = %d" %status) + * + * pvd = pvg.getPVData() # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":7604 + * pvd = pvg.getPVData() + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * else: + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + __pyx_t_19 = __pyx_t_4; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_19; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":7605 + * + * for i in range(0, pvg.getNPV()): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * else: + * statusList.append(status) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 7605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":7596 + * cdef PVDataHolder * pvd + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + goto __pyx_L23; + } + + /* "PyCafe.pyx":7607 + * statusList.append(pvd[i].getStatus()) + * else: + * statusList.append(status) # <<<<<<<<<<<<<< + * + * return status, statusList + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 7607, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L23:; + + /* "PyCafe.pyx":7609 + * statusList.append(status) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_statusList); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7515 + * + * ################################################################################## + * def setGroup(self, ghandleName, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "setGroup(self, ghandleName, list vectorList)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.setGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7617 + * ################################################################################## + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_407gameSetAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_407gameSetAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVAction = 0; + PyObject *__pyx_v_valAction = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("gameSetAndMatch (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVAction,&__pyx_n_s_valAction,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + CYTHON_FALLTHROUGH; + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 1); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVAction)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 2); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valAction)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 3); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 4); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 5); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 6: + if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 6); __PYX_ERR(0, 7617, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 7: + if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, 7); __PYX_ERR(0, 7617, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gameSetAndMatch") < 0)) __PYX_ERR(0, 7617, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + } + __pyx_v_handlePVSet = ((PyObject*)values[0]); + __pyx_v_valSet = ((PyObject*)values[1]); + __pyx_v_handlePVAction = values[2]; + __pyx_v_valAction = values[3]; + __pyx_v_handlePVMatch = ((PyObject*)values[4]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7617, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7617, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7617, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("gameSetAndMatch", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7617, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.gameSetAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVSet), (&PyList_Type), 1, "handlePVSet", 1))) __PYX_ERR(0, 7617, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(0, 7617, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(0, 7617, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_406gameSetAndMatch(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVAction, __pyx_v_valAction, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_406gameSetAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVAction, PyObject *__pyx_v_valAction, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + PyObject *__pyx_v_tmp = NULL; + std::vector __pyx_v_handleSet; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + std::vector __pyx_v_handleAction; + std::vector __pyx_v_valActionV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_t_8; + unsigned int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + std::string __pyx_t_12; + double __pyx_t_13; + __Pyx_RefNannySetupContext("gameSetAndMatch", 0); + __Pyx_INCREF(__pyx_v_handlePVAction); + __Pyx_INCREF(__pyx_v_valAction); + + /* "PyCafe.pyx":7618 + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_gameSetAndMatch_list_handlePVSet); + __pyx_v__METHOD = __pyx_kp_u_gameSetAndMatch_list_handlePVSet; + + /* "PyCafe.pyx":7621 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7621, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7621, __pyx_L1_error) + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7621, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7621, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7622 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7622, __pyx_L1_error) + + /* "PyCafe.pyx":7621 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + } + + /* "PyCafe.pyx":7625 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7625, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7625, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7625, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7625, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_2 != __pyx_t_1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7626 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7626, __pyx_L1_error) + + /* "PyCafe.pyx":7625 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":7629 + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + * if not isinstance(handlePVAction, (list)): # <<<<<<<<<<<<<< + * tmp = handlePVAction + * handlePVAction = [] + */ + __pyx_t_3 = PyList_Check(__pyx_v_handlePVAction); + __pyx_t_5 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7630 + * + * if not isinstance(handlePVAction, (list)): + * tmp = handlePVAction # <<<<<<<<<<<<<< + * handlePVAction = [] + * handlePVAction.append(tmp) + */ + __Pyx_INCREF(__pyx_v_handlePVAction); + __pyx_v_tmp = __pyx_v_handlePVAction; + + /* "PyCafe.pyx":7631 + * if not isinstance(handlePVAction, (list)): + * tmp = handlePVAction + * handlePVAction = [] # <<<<<<<<<<<<<< + * handlePVAction.append(tmp) + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handlePVAction, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7632 + * tmp = handlePVAction + * handlePVAction = [] + * handlePVAction.append(tmp) # <<<<<<<<<<<<<< + * + * if not isinstance(valAction, (list)): + */ + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_handlePVAction, __pyx_v_tmp); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 7632, __pyx_L1_error) + + /* "PyCafe.pyx":7629 + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + * if not isinstance(handlePVAction, (list)): # <<<<<<<<<<<<<< + * tmp = handlePVAction + * handlePVAction = [] + */ + } + + /* "PyCafe.pyx":7634 + * handlePVAction.append(tmp) + * + * if not isinstance(valAction, (list)): # <<<<<<<<<<<<<< + * tmp = valAction + * valAction = [] + */ + __pyx_t_5 = PyList_Check(__pyx_v_valAction); + __pyx_t_3 = ((!(__pyx_t_5 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7635 + * + * if not isinstance(valAction, (list)): + * tmp = valAction # <<<<<<<<<<<<<< + * valAction = [] + * valAction.append(tmp) + */ + __Pyx_INCREF(__pyx_v_valAction); + __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_v_valAction); + + /* "PyCafe.pyx":7636 + * if not isinstance(valAction, (list)): + * tmp = valAction + * valAction = [] # <<<<<<<<<<<<<< + * valAction.append(tmp) + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_valAction, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7637 + * tmp = valAction + * valAction = [] + * valAction.append(tmp) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleSet + */ + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_valAction, __pyx_v_tmp); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 7637, __pyx_L1_error) + + /* "PyCafe.pyx":7634 + * handlePVAction.append(tmp) + * + * if not isinstance(valAction, (list)): # <<<<<<<<<<<<<< + * tmp = valAction + * valAction = [] + */ + } + + /* "PyCafe.pyx":7640 + * + * cdef vector[unsigned int] handleSet + * handleSet.reserve(len(handlePVSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleMatch + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7640, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7640, __pyx_L1_error) + __pyx_v_handleSet.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7643 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7643, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7643, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7646 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleAction + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7646, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7646, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7649 + * + * cdef vector[unsigned int] handleAction + * handleAction.reserve(len(handlePVAction)) # <<<<<<<<<<<<<< + * + * cdef vector[string] valActionV + */ + __pyx_t_1 = PyObject_Length(__pyx_v_handlePVAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7649, __pyx_L1_error) + __pyx_v_handleAction.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7652 + * + * cdef vector[string] valActionV + * valActionV.reserve(len(valAction)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVSet)): + */ + __pyx_t_1 = PyObject_Length(__pyx_v_valAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7652, __pyx_L1_error) + __pyx_v_valActionV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7654 + * valActionV.reserve(len(valAction)) + * + * for i in range(0, len(handlePVSet)): # <<<<<<<<<<<<<< + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7654, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7654, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7655 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7655, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyInt_Check(__pyx_t_4); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_4); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L10_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7656 + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7656, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7656, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7656, __pyx_L1_error) + } + + /* "PyCafe.pyx":7655 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":7657 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7657, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7658 + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_handlePVSet) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_handlePVSet); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7658, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7658, __pyx_L1_error) + } + + /* "PyCafe.pyx":7657 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + goto __pyx_L9; + } + + /* "PyCafe.pyx":7660 + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7660, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7660, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_ThandlePVSet_list_member_should) < 0) __PYX_ERR(0, 7660, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":7662 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7662, __pyx_L1_error) + } + __pyx_L9:; + } + + /* "PyCafe.pyx":7664 + * raise _cafeException + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7664, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7664, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7665 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7665, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = PyInt_Check(__pyx_t_10); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_10); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L15_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7666 + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7666, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7666, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7666, __pyx_L1_error) + } + + /* "PyCafe.pyx":7665 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":7667 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7667, __pyx_L1_error) + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = PyUnicode_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7668 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_10 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7668, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7668, __pyx_L1_error) + } + + /* "PyCafe.pyx":7667 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":7670 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7670, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7670, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_error_info, __pyx_kp_u_handleMatch_list_member_should_b) < 0) __PYX_ERR(0, 7670, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7672 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVAction)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7672, __pyx_L1_error) + } + __pyx_L14:; + } + + /* "PyCafe.pyx":7674 + * raise _cafeException + * + * for i in range(0, len(handlePVAction)): # <<<<<<<<<<<<<< + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_handlePVAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7674, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7675 + * + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): # <<<<<<<<<<<<<< + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyInt_Check(__pyx_t_4); + __pyx_t_8 = (__pyx_t_5 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_8 = PyLong_Check(__pyx_t_4); + __pyx_t_5 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_5; + __pyx_L20_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = (__pyx_t_3 != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7676 + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVAction[i], (str)): + * handleAction.push_back(self.checkForHandle(handlePVAction)) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7676, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7676, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleAction.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7676, __pyx_L1_error) + } + + /* "PyCafe.pyx":7675 + * + * for i in range(0, len(handlePVAction)): + * if isinstance(handlePVAction[i], (int, long)): # <<<<<<<<<<<<<< + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":7677 + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): # <<<<<<<<<<<<<< + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handlePVAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_5 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7678 + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): + * handleAction.push_back(self.checkForHandle(handlePVAction)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_10, function); + } + } + __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_handlePVAction) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_handlePVAction); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleAction.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7678, __pyx_L1_error) + } + + /* "PyCafe.pyx":7677 + * if isinstance(handlePVAction[i], (int, long)): + * handleAction.push_back(handlePVAction[i]) + * elif isinstance(handlePVAction[i], (str)): # <<<<<<<<<<<<<< + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":7680 + * handleAction.push_back(self.checkForHandle(handlePVAction)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handlePVAction list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7680, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7680, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_handlePVAction_list_member_shoul) < 0) __PYX_ERR(0, 7680, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_10); + __pyx_t_10 = 0; + + /* "PyCafe.pyx":7682 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handlePVAction list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valAction)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7682, __pyx_L1_error) + } + __pyx_L19:; + } + + /* "PyCafe.pyx":7684 + * raise _cafeException + * + * for i in range(0, len(valAction)): # <<<<<<<<<<<<<< + * if not isinstance(valAction[i], (str)): + * valActionV.push_back(str(valAction[i])) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_valAction); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7684, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7685 + * + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): # <<<<<<<<<<<<<< + * valActionV.push_back(str(valAction[i])) + * else: + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = PyUnicode_Check(__pyx_t_10); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_5 = ((!(__pyx_t_3 != 0)) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7686 + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): + * valActionV.push_back(str(valAction[i])) # <<<<<<<<<<<<<< + * else: + * valActionV.push_back(valAction[i]) + */ + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7686, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valActionV.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7686, __pyx_L1_error) + } + + /* "PyCafe.pyx":7685 + * + * for i in range(0, len(valAction)): + * if not isinstance(valAction[i], (str)): # <<<<<<<<<<<<<< + * valActionV.push_back(str(valAction[i])) + * else: + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":7688 + * valActionV.push_back(str(valAction[i])) + * else: + * valActionV.push_back(valAction[i]) # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + /*else*/ { + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_valAction, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7688, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valActionV.push_back(__pyx_t_12); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7688, __pyx_L1_error) + } + } + __pyx_L24:; + } + + /* "PyCafe.pyx":7690 + * valActionV.push_back(valAction[i]) + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7690, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7690, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":7691 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7691, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7691, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_13); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7691, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7695 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.gameSetAndMatch( + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7696 + * + * with nogil: + * status = self._c_cafe.gameSetAndMatch( # <<<<<<<<<<<<<< + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->gameSetAndMatch(__pyx_v_handleSet, __pyx_v_valSetV, __pyx_v_handleAction, __pyx_v_valActionV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7695 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.gameSetAndMatch( + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":7699 + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7700 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_5 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_5) { + + /* "PyCafe.pyx":7701 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7700 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7703 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7702 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + * + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7702, __pyx_L1_error) + + /* "PyCafe.pyx":7699 + * handleSet, valSetV, handleAction, valActionV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7705 + * "EXCEPTION RAISED in PyCafe def gameSetAndMatch. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7617 + * ################################################################################## + * + * def gameSetAndMatch(self, list handlePVSet, list valSet, handlePVAction, valAction, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "gameSetAndMatch(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("PyCafe.CyCafe.gameSetAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF(__pyx_v_tmp); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XDECREF(__pyx_v_handlePVAction); + __Pyx_XDECREF(__pyx_v_valAction); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7710 + * ################################################################################## + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_409setAndMatchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_409setAndMatchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setAndMatchMany (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 1); __PYX_ERR(0, 7710, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 2); __PYX_ERR(0, 7710, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 3); __PYX_ERR(0, 7710, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 4); __PYX_ERR(0, 7710, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 5); __PYX_ERR(0, 7710, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatchMany") < 0)) __PYX_ERR(0, 7710, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + } + __pyx_v_handlePVSet = ((PyObject*)values[0]); + __pyx_v_valSet = ((PyObject*)values[1]); + __pyx_v_handlePVMatch = ((PyObject*)values[2]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7710, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7710, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7710, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7710, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVSet), (&PyList_Type), 1, "handlePVSet", 1))) __PYX_ERR(0, 7710, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(0, 7710, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(0, 7710, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_408setAndMatchMany(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_408setAndMatchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_handleSet; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + double __pyx_t_11; + __Pyx_RefNannySetupContext("setAndMatchMany", 0); + + /* "PyCafe.pyx":7711 + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatchMany_list_handlePVSet); + __pyx_v__METHOD = __pyx_kp_u_setAndMatchMany_list_handlePVSet; + + /* "PyCafe.pyx":7714 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7714, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7714, __pyx_L1_error) + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7714, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7714, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7715 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7715, __pyx_L1_error) + + /* "PyCafe.pyx":7714 + * + * + * if (len(handlePVSet) != len(valSet)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + */ + } + + /* "PyCafe.pyx":7718 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7718, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7718, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7718, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7718, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_2 != __pyx_t_1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7719 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7719, __pyx_L1_error) + + /* "PyCafe.pyx":7718 + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + * if (len(handlePVSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":7723 + * + * cdef vector[unsigned int] handleSet + * handleSet.reserve(len(handlePVSet)) # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] handleMatch + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7723, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7723, __pyx_L1_error) + __pyx_v_handleSet.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7726 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7726, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7726, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7729 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVSet)): + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7729, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7729, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_1); + + /* "PyCafe.pyx":7731 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVSet)): # <<<<<<<<<<<<<< + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7731, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7731, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7732 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7732, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7732, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L8_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7733 + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7733, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7733, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7733, __pyx_L1_error) + } + + /* "PyCafe.pyx":7732 + * + * for i in range(0, len(handlePVSet)): + * if isinstance(handlePVSet[i], (int, long)): # <<<<<<<<<<<<<< + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":7734 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7734, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7734, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7735 + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): + * handleSet.push_back(self.checkForHandle(handlePVSet)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_handlePVSet) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_handlePVSet); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7735, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7735, __pyx_L1_error) + } + + /* "PyCafe.pyx":7734 + * if isinstance(handlePVSet[i], (int, long)): + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)): # <<<<<<<<<<<<<< + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":7737 + * handleSet.push_back(self.checkForHandle(handlePVSet)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_ThandlePVSet_list_member_should) < 0) __PYX_ERR(0, 7737, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":7739 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="ThandlePVSet list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7739, __pyx_L1_error) + } + __pyx_L7:; + } + + /* "PyCafe.pyx":7741 + * raise _cafeException + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7741, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7741, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7742 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7742, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyInt_Check(__pyx_t_9); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L13_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_9); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L13_bool_binop_done:; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7743 + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7743, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7743, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7743, __pyx_L1_error) + } + + /* "PyCafe.pyx":7742 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":7744 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7744, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyUnicode_Check(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7745 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7745, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7745, __pyx_L1_error) + } + + /* "PyCafe.pyx":7744 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L12; + } + + /* "PyCafe.pyx":7747 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7747, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7747, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_error_info, __pyx_kp_u_handleMatch_list_member_should_b) < 0) __PYX_ERR(0, 7747, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":7749 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="handleMatch list member should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7749, __pyx_L1_error) + } + __pyx_L12:; + } + + /* "PyCafe.pyx":7751 + * raise _cafeException + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7751, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7751, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7752 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7752, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7752, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7752, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7756 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatchMany( + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7757 + * + * with nogil: + * status = self._c_cafe.setAndMatchMany( # <<<<<<<<<<<<<< + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setAndMatchMany(__pyx_v_handleSet, __pyx_v_valSetV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7756 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatchMany( + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":7760 + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7761 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7762 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7761 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7764 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":7763 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + * + */ + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7763, __pyx_L1_error) + + /* "PyCafe.pyx":7760 + * handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7766 + * "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7710 + * ################################################################################## + * + * def setAndMatchMany(self, list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7771 + * ############################################################################ + * + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, # <<<<<<<<<<<<<< + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_411setAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_411setAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePVSet = 0; + double __pyx_v_valSet; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setAndMatch (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePVSet,&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[6] = {0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 1); __PYX_ERR(0, 7771, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 2); __PYX_ERR(0, 7771, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 3); __PYX_ERR(0, 7771, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 4); __PYX_ERR(0, 7771, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 5); __PYX_ERR(0, 7771, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatch") < 0)) __PYX_ERR(0, 7771, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + } + __pyx_v_handlePVSet = values[0]; + __pyx_v_valSet = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_valSet == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7771, __pyx_L3_error) + __pyx_v_handlePVMatch = values[2]; + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7772, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7772, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7772, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7771, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_410setAndMatch(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePVSet, __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_410setAndMatch(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePVSet, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handleSet; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + unsigned int __pyx_v_handleMatch; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("setAndMatch", 0); + + /* "PyCafe.pyx":7773 + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," # <<<<<<<<<<<<<< + * "handlePVMatch, double tolerance," + * "double timeout, bint printFlag)") + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatch_handlePVSet_double_v); + __pyx_v__METHOD = __pyx_kp_u_setAndMatch_handlePVSet_double_v; + + /* "PyCafe.pyx":7777 + * "double timeout, bint printFlag)") + * + * cdef unsigned int handleSet = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + */ + __pyx_v_handleSet = 0; + + /* "PyCafe.pyx":7778 + * + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): # <<<<<<<<<<<<<< + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVSet); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVSet); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7779 + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet, (str)): + * handleSet = self.checkForHandle(handlePVSet) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVSet); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7779, __pyx_L1_error) + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":7778 + * + * cdef unsigned int handleSet = 0 + * if isinstance(handlePVSet, (int, long)): # <<<<<<<<<<<<<< + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7780 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): # <<<<<<<<<<<<<< + * handleSet = self.checkForHandle(handlePVSet) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVSet); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7781 + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): + * handleSet = self.checkForHandle(handlePVSet) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePVSet) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePVSet); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7781, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":7780 + * if isinstance(handlePVSet, (int, long)): + * handleSet = handlePVSet + * elif isinstance(handlePVSet, (str)): # <<<<<<<<<<<<<< + * handleSet = self.checkForHandle(handlePVSet) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7783 + * handleSet = self.checkForHandle(handlePVSet) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("First input argument, should be of type if handle," + + */ + /*else*/ { + + /* "PyCafe.pyx":7784 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("First input argument, should be of type if handle," + + * "else if PV")) + */ + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7784, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7784, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7784, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o_6) < 0) __PYX_ERR(0, 7784, __pyx_L1_error) + + /* "PyCafe.pyx":7783 + * handleSet = self.checkForHandle(handlePVSet) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("First input argument, should be of type if handle," + + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":7787 + * _error_info=("First input argument, should be of type if handle," + + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef unsigned int handleMatch = 0 + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7787, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7789 + * raise _cafeException + * + * cdef unsigned int handleMatch = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":7790 + * + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVMatch); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVMatch); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7791 + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVMatch); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7791, __pyx_L1_error) + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7790 + * + * cdef unsigned int handleMatch = 0 + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7792 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7793 + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException( + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7793, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7792 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7795 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("Third input argument, should be of type if handle," + + */ + /*else*/ { + + /* "PyCafe.pyx":7796 + * else: + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info=("Third input argument, should be of type if handle," + + * "else if PV")) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7796, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7796, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7796, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_kp_u_Third_input_argument_should_be_o_2) < 0) __PYX_ERR(0, 7796, __pyx_L1_error) + + /* "PyCafe.pyx":7795 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_info=("Third input argument, should be of type if handle," + + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7799 + * _error_info=("Third input argument, should be of type if handle," + + * "else if PV")) + * raise _cafeException # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7799, __pyx_L1_error) + } + __pyx_L6:; + + /* "PyCafe.pyx":7803 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatch( + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7804 + * + * with nogil: + * status = self._c_cafe.setAndMatch( # <<<<<<<<<<<<<< + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setAndMatch(__pyx_v_handleSet, __pyx_v_valSet, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7803 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.setAndMatch( + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":7807 + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7808 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7809 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7808 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7811 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7810 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + * + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 7810, __pyx_L1_error) + + /* "PyCafe.pyx":7807 + * handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7813 + * "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7771 + * ############################################################################ + * + * def setAndMatch(self, handlePVSet, double valSet, handlePVMatch, # <<<<<<<<<<<<<< + * double tolerance, double timeout, bint printFlag): + * cdef str _METHOD = ("setAndMatch(handlePVSet, double valSet," + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("PyCafe.CyCafe.setAndMatch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7818 + * ################################################################################## + * + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_413matchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_413matchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("matchMany (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 1); __PYX_ERR(0, 7818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 2); __PYX_ERR(0, 7818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 3); __PYX_ERR(0, 7818, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 4); __PYX_ERR(0, 7818, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matchMany") < 0)) __PYX_ERR(0, 7818, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_valSet = ((PyObject*)values[0]); + __pyx_v_handlePVMatch = ((PyObject*)values[1]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7818, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7818, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7818, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7818, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.matchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(0, 7818, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(0, 7818, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_412matchMany(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_412matchMany(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + double __pyx_t_11; + __Pyx_RefNannySetupContext("matchMany", 0); + + /* "PyCafe.pyx":7820 + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_kp_u_matchMany_list_valSet_list_handl); + __pyx_v__METHOD = __pyx_kp_u_matchMany_list_valSet_list_handl; + + /* "PyCafe.pyx":7823 + * + * + * if (len(valSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7823, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7823, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7823, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7823, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7824 + * + * if (len(valSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7824, __pyx_L1_error) + + /* "PyCafe.pyx":7823 + * + * + * if (len(valSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":7828 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7828, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7828, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7831 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7831, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7831, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7833 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7833, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7833, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7834 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7834, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7835 + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7835, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7835, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7835, __pyx_L1_error) + } + + /* "PyCafe.pyx":7834 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7836 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7836, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7837 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7837, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7837, __pyx_L1_error) + } + + /* "PyCafe.pyx":7836 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7839 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o) < 0) __PYX_ERR(0, 7839, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":7841 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7841, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":7843 + * raise _cafeException + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7843, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7843, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7844 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7844, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7844, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7848 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchMany( + * valSetV, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7849 + * + * with nogil: + * status = self._c_cafe.matchMany( # <<<<<<<<<<<<<< + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->matchMany(__pyx_v_valSetV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7848 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchMany( + * valSetV, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":7852 + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7853 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7854 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7853 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7856 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":7855 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + * + */ + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __PYX_ERR(0, 7855, __pyx_L1_error) + + /* "PyCafe.pyx":7852 + * valSetV, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7858 + * "EXCEPTION RAISED in PyCafe def matchMany. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7818 + * ################################################################################## + * + * def matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchMany(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.matchMany", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7862 + * + * + * def matchManyWithStatus(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_415matchManyWithStatus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_415matchManyWithStatus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_valSet = 0; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("matchManyWithStatus (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchManyWithStatus", 1, 5, 5, 1); __PYX_ERR(0, 7862, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchManyWithStatus", 1, 5, 5, 2); __PYX_ERR(0, 7862, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchManyWithStatus", 1, 5, 5, 3); __PYX_ERR(0, 7862, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchManyWithStatus", 1, 5, 5, 4); __PYX_ERR(0, 7862, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matchManyWithStatus") < 0)) __PYX_ERR(0, 7862, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_valSet = ((PyObject*)values[0]); + __pyx_v_handlePVMatch = ((PyObject*)values[1]); + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7862, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7862, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7862, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("matchManyWithStatus", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7862, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.matchManyWithStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) __PYX_ERR(0, 7862, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) __PYX_ERR(0, 7862, __pyx_L1_error) + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_414matchManyWithStatus(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_414matchManyWithStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + std::vector __pyx_v_handleMatch; + std::vector __pyx_v_valSetV; + std::vector __pyx_v_statusV; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + double __pyx_t_11; + __Pyx_RefNannySetupContext("matchManyWithStatus", 0); + + /* "PyCafe.pyx":7864 + * def matchManyWithStatus(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): + * + * cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" # <<<<<<<<<<<<<< + * + * if (len(valSet) != len(handlePVMatch)): + */ + __Pyx_INCREF(__pyx_kp_u_matchManyWithStatus_list_valSet); + __pyx_v__METHOD = __pyx_kp_u_matchManyWithStatus_list_valSet; + + /* "PyCafe.pyx":7866 + * cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + * if (len(valSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7866, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7866, __pyx_L1_error) + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7866, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7866, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_1 != __pyx_t_2) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7867 + * + * if (len(valSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 7867, __pyx_L1_error) + + /* "PyCafe.pyx":7866 + * cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + * + * if (len(valSet) != len(handlePVMatch)): # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + */ + } + + /* "PyCafe.pyx":7871 + * + * cdef vector[unsigned int] handleMatch + * handleMatch.reserve(len(handlePVMatch)) # <<<<<<<<<<<<<< + * + * cdef vector[double] valSetV + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7871, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7871, __pyx_L1_error) + __pyx_v_handleMatch.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7874 + * + * cdef vector[double] valSetV + * valSetV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * cdef vector[int] statusV + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7874, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7874, __pyx_L1_error) + __pyx_v_valSetV.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7877 + * + * cdef vector[int] statusV + * statusV.reserve(len(valSet)) # <<<<<<<<<<<<<< + * + * for i in range(0, len(handlePVMatch)): + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7877, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7877, __pyx_L1_error) + __pyx_v_statusV.reserve(__pyx_t_2); + + /* "PyCafe.pyx":7879 + * statusV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7879, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7879, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7880 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7880, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyInt_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_6 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_3 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_4); + __pyx_t_6 = (__pyx_t_7 != 0); + __pyx_t_3 = __pyx_t_6; + __pyx_L7_bool_binop_done:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = (__pyx_t_3 != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":7881 + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7881, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7881, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7881, __pyx_L1_error) + } + + /* "PyCafe.pyx":7880 + * + * for i in range(0, len(handlePVMatch)): + * if isinstance(handlePVMatch[i], (int, long)): # <<<<<<<<<<<<<< + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7882 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7882, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyUnicode_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = (__pyx_t_6 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7883 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7883, __pyx_L1_error) + } + + /* "PyCafe.pyx":7882 + * if isinstance(handlePVMatch[i], (int, long)): + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)): # <<<<<<<<<<<<<< + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":7885 + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) + * else: + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7885, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7885, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_error_info, __pyx_kp_u_First_input_argument_should_be_o) < 0) __PYX_ERR(0, 7885, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":7887 + * _cafeException = CafeException(_type='CafeError', _source=_METHOD, + * _error_info="First input argument, should be of type if handle, else if PV") + * raise _cafeException # <<<<<<<<<<<<<< + * + * for i in range(0, len(valSet)): + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7887, __pyx_L1_error) + } + __pyx_L6:; + } + + /* "PyCafe.pyx":7889 + * raise _cafeException + * + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * valSetV.push_back(valSet[i]) + * + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 7889, __pyx_L1_error) + } + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 7889, __pyx_L1_error) + __pyx_t_1 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":7890 + * + * for i in range(0, len(valSet)): + * valSetV.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * cdef int status + */ + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 7890, __pyx_L1_error) + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 7890, __pyx_L1_error) + } + } + + /* "PyCafe.pyx":7894 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchManyWithStatus( + * valSetV, handleMatch, tolerance, timeout, printFlag, statusV) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7895 + * + * with nogil: + * status = self._c_cafe.matchManyWithStatus( # <<<<<<<<<<<<<< + * valSetV, handleMatch, tolerance, timeout, printFlag, statusV) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->matchManyWithStatus(__pyx_v_valSetV, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag, __pyx_v_statusV); + } + + /* "PyCafe.pyx":7894 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.matchManyWithStatus( + * valSetV, handleMatch, tolerance, timeout, printFlag, statusV) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":7898 + * valSetV, handleMatch, tolerance, timeout, printFlag, statusV) + * + * print("status from pxy", statusV) # <<<<<<<<<<<<<< + * + * if status != ICAFE_NORMAL: + */ + __pyx_t_9 = __pyx_convert_vector_to_py_int(__pyx_v_statusV); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_status_from_pxy); + __Pyx_GIVEREF(__pyx_kp_u_status_from_pxy); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_status_from_pxy); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":7900 + * print("status from pxy", statusV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7901 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":7902 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * return status, statusV + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7901 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":7900 + * print("status from pxy", statusV) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7904 + * self._c_cafe.printStatusMessage(status) + * + * return status, statusV # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_4 = __pyx_convert_vector_to_py_int(__pyx_v_statusV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4); + __pyx_t_9 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7862 + * + * + * def matchManyWithStatus(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = "matchManyWithStatus(list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.CyCafe.matchManyWithStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7910 + * ############################################################################ + * + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_417match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_417match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_valSet; + PyObject *__pyx_v_handlePVMatch = 0; + double __pyx_v_tolerance; + double __pyx_v_timeout; + int __pyx_v_printFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("match (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_valSet,&__pyx_n_s_handlePVMatch,&__pyx_n_s_tolerance,&__pyx_n_s_timeout,&__pyx_n_s_printFlag,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 1); __PYX_ERR(0, 7910, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 2); __PYX_ERR(0, 7910, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 3); __PYX_ERR(0, 7910, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 4); __PYX_ERR(0, 7910, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "match") < 0)) __PYX_ERR(0, 7910, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_valSet = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_valSet == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7910, __pyx_L3_error) + __pyx_v_handlePVMatch = values[1]; + __pyx_v_tolerance = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_tolerance == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7910, __pyx_L3_error) + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7910, __pyx_L3_error) + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7910, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7910, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.match", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_416match(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_valSet, __pyx_v_handlePVMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_416match(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_valSet, PyObject *__pyx_v_handlePVMatch, double __pyx_v_tolerance, double __pyx_v_timeout, int __pyx_v_printFlag) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handleMatch; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("match", 0); + + /* "PyCafe.pyx":7912 + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") # <<<<<<<<<<<<<< + * + * cdef unsigned int handleMatch = 0 + */ + __Pyx_INCREF(__pyx_kp_u_match_double_valSet_handlePVMatc); + __pyx_v__METHOD = __pyx_kp_u_match_double_valSet_handlePVMatc; + + /* "PyCafe.pyx":7914 + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + * + * cdef unsigned int handleMatch = 0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePVMatch, (int, long)): + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":7916 + * cdef unsigned int handleMatch = 0 + * + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePVMatch); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePVMatch); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7917 + * + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePVMatch); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7917, __pyx_L1_error) + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7916 + * cdef unsigned int handleMatch = 0 + * + * if isinstance(handlePVMatch, (int, long)): # <<<<<<<<<<<<<< + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7918 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7919 + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): + * handleMatch = self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePVMatch) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePVMatch); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7919, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":7918 + * if isinstance(handlePVMatch, (int, long)): + * handleMatch = handlePVMatch + * elif isinstance(handlePVMatch, (str)): # <<<<<<<<<<<<<< + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7921 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7922 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7921 + * handleMatch = self.checkForHandle(handlePVMatch) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 7921, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7926 + * "if handle, else if PV"))) + * + * cdef int status = ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":7929 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.match( + * valSet, handleMatch, tolerance, timeout, printFlag) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":7930 + * + * with nogil: + * status = self._c_cafe.match( # <<<<<<<<<<<<<< + * valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->match(__pyx_v_valSet, __pyx_v_handleMatch, __pyx_v_tolerance, __pyx_v_timeout, __pyx_v_printFlag); + } + + /* "PyCafe.pyx":7929 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status = self._c_cafe.match( + * valSet, handleMatch, tolerance, timeout, printFlag) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":7933 + * valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7934 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7935 + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":7934 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * raise Exception( + */ + } + + /* "PyCafe.pyx":7937 + * self._c_cafe.printStatusMessage(status) + * raise Exception( + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7936 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + * + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 7936, __pyx_L1_error) + + /* "PyCafe.pyx":7933 + * valSet, handleMatch, tolerance, timeout, printFlag) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":7939 + * "EXCEPTION RAISED in PyCafe def match. Status = %d" % status) + * + * return status # <<<<<<<<<<<<<< + * + * return 1 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7941 + * return status + * + * return 1 # <<<<<<<<<<<<<< + * ############################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_1); + __pyx_r = __pyx_int_1; + goto __pyx_L0; + + /* "PyCafe.pyx":7910 + * ############################################################################ + * + * def match(self, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag): # <<<<<<<<<<<<<< + * + * cdef str _METHOD = ("match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.match", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7946 + * ############################################################################ + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_419setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_419setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemCtrl (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_nelem_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemCtrl", 1, 2, 2, 1); __PYX_ERR(0, 7946, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemCtrl") < 0)) __PYX_ERR(0, 7946, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_nelem = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_nelem == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7946, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelemCtrl", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7946, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_418setNelemCtrl(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_nelem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_418setNelemCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemCtrl", 0); + + /* "PyCafe.pyx":7947 + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i); + __pyx_v__METHOD = __pyx_kp_u_setNelemCtrl_handlePV_unsigned_i; + + /* "PyCafe.pyx":7949 + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7950 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7951 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7951, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7950 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7952 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7953 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7953, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7952 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7955 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7956 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7955 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 7955, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7960 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7961 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7962 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7961 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":7964 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7964, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 7964, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7965 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 7964, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7966 + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7966, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 7964, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7963 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7967 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # returns nelem + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7967, __pyx_L1_error) + + /* "PyCafe.pyx":7960 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7970 + * + * # returns nelem + * return self.hh.setNelemCtrl(handle, nelem) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelemCtrl(__pyx_v_handle, __pyx_v_nelem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7946 + * ############################################################################ + * + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemCtrl(handlePV, unsigned int nelem)" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemCtrl", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":7974 + * ################################################################################## + * + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelem" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_421setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_421setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelem (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_nelem_2,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelem", 1, 2, 2, 1); __PYX_ERR(0, 7974, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelem") < 0)) __PYX_ERR(0, 7974, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_nelem = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_nelem == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7974, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelem", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7974, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_420setNelem(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_nelem); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_420setNelem(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelem", 0); + + /* "PyCafe.pyx":7975 + * + * def setNelem(self, handlePV, unsigned int nelem): + * cdef str _METHOD = "setNelem" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelem); + __pyx_v__METHOD = __pyx_n_u_setNelem; + + /* "PyCafe.pyx":7977 + * cdef str _METHOD = "setNelem" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":7978 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":7979 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7979, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7978 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7980 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7981 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7981, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":7980 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":7983 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":7984 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":7983 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 7983, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":7988 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7989 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":7990 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":7989 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":7992 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 7992, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 7992, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7992, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 7992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7993 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 7992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7994 + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 7992, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":7991 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":7995 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 7995, __pyx_L1_error) + + /* "PyCafe.pyx":7988 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":7999 + * + * # returns nelem + * return self.hh.setNelem(handle, nelem) # <<<<<<<<<<<<<< + * + * ############################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelem(__pyx_v_handle, __pyx_v_nelem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":7974 + * ################################################################################## + * + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelem" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":8002 + * + * ############################################################################ + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToNative" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_423setNelemToNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_423setNelemToNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToNative (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_422setNelemToNative(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_422setNelemToNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CafeException *__pyx_v__cafeException = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToNative", 0); + + /* "PyCafe.pyx":8003 + * ############################################################################ + * def setNelemToNative(self, handlePV): + * cdef str _METHOD = "setNelemToNative" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelemToNative); + __pyx_v__METHOD = __pyx_n_u_setNelemToNative; + + /* "PyCafe.pyx":8005 + * cdef str _METHOD = "setNelemToNative" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":8006 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":8007 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8007, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8006 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8008 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8009 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8009, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8008 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8011 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":8012 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":8011 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8011, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 8011, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":8016 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8017 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8018 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":8017 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + */ + } + + /* "PyCafe.pyx":8020 + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, # <<<<<<<<<<<<<< + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + */ + __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_CafeError) < 0) __PYX_ERR(0, 8020, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD) < 0) __PYX_ERR(0, 8020, __pyx_L1_error) + + /* "PyCafe.pyx":8021 + * _cafeException = CafeException( + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, # <<<<<<<<<<<<<< + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_ERROR_STATE(ECAFE_INVALID_HANDLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_code, __pyx_t_5) < 0) __PYX_ERR(0, 8020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":8022 + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), # <<<<<<<<<<<<<< + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_text, __pyx_t_5) < 0) __PYX_ERR(0, 8020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":8023 + * _error_code=ECAFE_INVALID_HANDLE, + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) # <<<<<<<<<<<<<< + * raise _cafeException + * + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(ECAFE_INVALID_HANDLE)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8023, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_error_info, __pyx_t_5) < 0) __PYX_ERR(0, 8020, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":8019 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * _cafeException = CafeException( # <<<<<<<<<<<<<< + * _type='CafeError', _source=_METHOD, + * _error_code=ECAFE_INVALID_HANDLE, + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8019, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cafeException = ((struct __pyx_obj_6PyCafe_CafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":8024 + * _error_text=self.cs.code(ECAFE_INVALID_HANDLE), + * _error_info=self.cs.info(ECAFE_INVALID_HANDLE)) + * raise _cafeException # <<<<<<<<<<<<<< + * + * # returns nelem + */ + __Pyx_Raise(((PyObject *)__pyx_v__cafeException), 0, 0, 0); + __PYX_ERR(0, 8024, __pyx_L1_error) + + /* "PyCafe.pyx":8016 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":8027 + * + * # returns nelem + * return self.hh.setNelemToNative(handle) # <<<<<<<<<<<<<< + * + * ############################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setNelemToNative(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8027, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":8002 + * + * ############################################################################ + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToNative" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToNative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XDECREF((PyObject *)__pyx_v__cafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":8031 + * ############################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_425setNelemToRetrieveFromCacheToOne(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_425setNelemToRetrieveFromCacheToOne(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCacheToOne (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_424setNelemToRetrieveFromCacheToOne(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handlePV)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_424setNelemToRetrieveFromCacheToOne(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCacheToOne", 0); + + /* "PyCafe.pyx":8032 + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = 0 + */ + __Pyx_INCREF(__pyx_n_u_setNelemToRetrieveFromCacheToOne); + __pyx_v__METHOD = __pyx_n_u_setNelemToRetrieveFromCacheToOne; + + /* "PyCafe.pyx":8034 + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":8035 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":8036 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8036, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8035 + * + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8037 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8038 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8038, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8037 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8040 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":8041 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":8040 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 8040, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":8045 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8046 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8047 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":8046 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":8048 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 8048, __pyx_L1_error) + + /* "PyCafe.pyx":8045 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":8052 + * + * # returns previous nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToOne(handle) # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToOne(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":8031 + * ############################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "setNelemToRetrieveFromCacheToOne" + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCacheToOne", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":8055 + * + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): # <<<<<<<<<<<<<< + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_427setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_427setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + int __pyx_v_netrfc; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCache (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handlePV,&__pyx_n_s_netrfc,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_netrfc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, 1); __PYX_ERR(0, 8055, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemToRetrieveFromCache") < 0)) __PYX_ERR(0, 8055, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_handlePV = values[0]; + __pyx_v_netrfc = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_netrfc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8055, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8055, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_426setNelemToRetrieveFromCache(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_netrfc); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_426setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_netrfc) { + PyObject *__pyx_v__METHOD = 0; + unsigned int __pyx_v_handle; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + unsigned int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCache", 0); + + /* "PyCafe.pyx":8056 + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): + * cdef str _METHOD="etNelemToRetrieveFromCache" # <<<<<<<<<<<<<< + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + */ + __Pyx_INCREF(__pyx_n_u_etNelemToRetrieveFromCache); + __pyx_v__METHOD = __pyx_n_u_etNelemToRetrieveFromCache; + + /* "PyCafe.pyx":8057 + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int, long)): + * handle = handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":8058 + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + __pyx_t_2 = PyInt_Check(__pyx_v_handlePV); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_handlePV); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":8059 + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): + * handle = handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8059, __pyx_L1_error) + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8058 + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + * if isinstance(handlePV, (int, long)): # <<<<<<<<<<<<<< + * handle = handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8060 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8061 + * handle = handlePV + * elif isinstance(handlePV, (str)): + * handle = self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise TypeError("{} {} \n{}".format( + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_handlePV) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_handlePV); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8061, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":8060 + * if isinstance(handlePV, (int, long)): + * handle = handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle = self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":8063 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__40, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":8064 + * else: + * raise TypeError("{} {} \n{}".format( + * self._exception_text, _METHOD, # <<<<<<<<<<<<<< + * ("First Input argument should be of type " + * "if handle, else if PV"))) + */ + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_self->_exception_text, __pyx_v__METHOD, __pyx_kp_u_First_Input_argument_should_be_o}; + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else + #endif + { + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_INCREF(__pyx_v_self->_exception_text); + __Pyx_GIVEREF(__pyx_v_self->_exception_text); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->_exception_text); + __Pyx_INCREF(__pyx_v__METHOD); + __Pyx_GIVEREF(__pyx_v__METHOD); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v__METHOD); + __Pyx_INCREF(__pyx_kp_u_First_Input_argument_should_be_o); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_o); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_Input_argument_should_be_o); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":8063 + * handle = self.checkForHandle(handlePV) + * else: + * raise TypeError("{} {} \n{}".format( # <<<<<<<<<<<<<< + * self._exception_text, _METHOD, + * ("First Input argument should be of type " + */ + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 8063, __pyx_L1_error) + } + __pyx_L3:; + + /* "PyCafe.pyx":8068 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8069 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":8070 + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) # <<<<<<<<<<<<<< + * raise Exception( + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":8069 + * + * if handle == 0: + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( + */ + } + + /* "PyCafe.pyx":8071 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(0, 8071, __pyx_L1_error) + + /* "PyCafe.pyx":8068 + * "if handle, else if PV"))) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":8075 + * + * # returns new nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToPrevious(handle, netrfc) # <<<<<<<<<<<<<< + * + * ################################################################################ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToPrevious(__pyx_v_handle, __pyx_v_netrfc)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":8055 + * + * ################################################################################ + * def setNelemToRetrieveFromCache(self, handlePV, int netrfc): # <<<<<<<<<<<<<< + * cdef str _METHOD="etNelemToRetrieveFromCache" + * cdef unsigned int handle = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":8079 + * ################################################################################ + * + * def terminate(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.terminate() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_429terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_429terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("terminate (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_428terminate(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_428terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("terminate", 0); + + /* "PyCafe.pyx":8080 + * + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + #endif + /*try:*/ { + + /* "PyCafe.pyx":8081 + * def terminate(self): + * with nogil: + * self._c_cafe.terminate() # <<<<<<<<<<<<<< + * return + * ################################################################################ + */ + (void)(__pyx_v_self->_c_cafe->terminate()); + } + + /* "PyCafe.pyx":8080 + * + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":8082 + * with nogil: + * self._c_cafe.terminate() + * return # <<<<<<<<<<<<<< + * ################################################################################ + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":8079 + * ################################################################################ + * + * def terminate(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.terminate() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_431__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_431__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_430__reduce_cython__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_430__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_433__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_433__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_432__setstate_cython__(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_432__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafe.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6PyCafe_3__pyx_unpickle_CafeException = {"__pyx_unpickle_CafeException", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6PyCafe_3__pyx_unpickle_CafeException(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CafeException") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CafeException", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_2__pyx_unpickle_CafeException(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + */ + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8ae6b84) != 0); + if (__pyx_t_1) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v___pyx_PickleError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum != 0x8ae6b84: + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x8a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v___pyx_PickleError); + __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x8ae6b84: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6PyCafe_CafeException), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v___pyx_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_1 = (__pyx_v___pyx_state != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "(tree fragment)":9 + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(((struct __pyx_obj_6PyCafe_CafeException *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8ae6b84 = (error_code, error_info, error_text, handle, name, source, type))" % __pyx_checksum) + * __pyx_result = CafeException.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_6PyCafe___pyx_unpickle_CafeException__set_state(struct __pyx_obj_6PyCafe_CafeException *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + unsigned int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_CafeException__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->error_code = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->error_info); + __Pyx_DECREF(__pyx_v___pyx_result->error_info); + __pyx_v___pyx_result->error_info = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->error_text); + __Pyx_DECREF(__pyx_v___pyx_result->error_text); + __pyx_v___pyx_result->error_text = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->handle = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->source); + __Pyx_DECREF(__pyx_v___pyx_result->source); + __pyx_v___pyx_result->source = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->type); + __Pyx_DECREF(__pyx_v___pyx_result->type); + __pyx_v___pyx_result->type = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_6 = ((__pyx_t_5 > 7) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_4 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_4 = __pyx_t_7; + __pyx_L4_bool_binop_done:; + if (__pyx_t_4) { + + /* "(tree fragment)":14 + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[7]) # <<<<<<<<<<<<<< + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[7]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_CafeException__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_CafeException__set_state(CafeException __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.error_code = __pyx_state[0]; __pyx_result.error_info = __pyx_state[1]; __pyx_result.error_text = __pyx_state[2]; __pyx_result.handle = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.source = __pyx_state[5]; __pyx_result.type = __pyx_state[6] + * if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("PyCafe.__pyx_unpickle_CafeException__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * # experimental exception made for __getbuffer__ and __releasebuffer__ + * # -- the details of this may change. + * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_i; + int __pyx_v_ndim; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + int __pyx_v_t; + char *__pyx_v_f; + PyArray_Descr *__pyx_v_descr = 0; + int __pyx_v_offset; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + PyArray_Descr *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + char *__pyx_t_9; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 + * + * cdef int i, ndim + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + */ + __pyx_v_endian_detector = 1; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 + * cdef int i, ndim + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * + * ndim = PyArray_NDIM(self) + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + */ + __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 272, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * ndim = PyArray_NDIM(self) + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 276, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 + * raise ValueError(u"ndarray is not Fortran contiguous") + * + * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 + * + * info.buf = PyArray_DATA(self) + * info.ndim = ndim # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * # Allocate new buffer for strides and shape info. + */ + __pyx_v_info->ndim = __pyx_v_ndim; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< + * info.shape = info.strides + ndim + * for i in range(ndim): + */ + __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 + * # This is allocated as one block, strides first. + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) + * info.shape = info.strides + ndim # <<<<<<<<<<<<<< + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] + */ + __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 + * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) + * info.shape = info.strides + ndim + * for i in range(ndim): # <<<<<<<<<<<<<< + * info.strides[i] = PyArray_STRIDES(self)[i] + * info.shape[i] = PyArray_DIMS(self)[i] + */ + __pyx_t_4 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 + * info.shape = info.strides + ndim + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< + * info.shape[i] = PyArray_DIMS(self)[i] + * else: + */ + (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287 + * for i in range(ndim): + * info.strides[i] = PyArray_STRIDES(self)[i] + * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< + * else: + * info.strides = PyArray_STRIDES(self) + */ + (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + goto __pyx_L9; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 + * info.shape[i] = PyArray_DIMS(self)[i] + * else: + * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL + */ + /*else*/ { + __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 + * else: + * info.strides = PyArray_STRIDES(self) + * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) + */ + __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); + } + __pyx_L9:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * info.strides = PyArray_STRIDES(self) + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = PyArray_ITEMSIZE(self) + * info.readonly = not PyArray_ISWRITEABLE(self) + */ + __pyx_v_info->suboffsets = NULL; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 + * info.shape = PyArray_DIMS(self) + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< + * info.readonly = not PyArray_ISWRITEABLE(self) + * + */ + __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 + * info.suboffsets = NULL + * info.itemsize = PyArray_ITEMSIZE(self) + * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< + * + * cdef int t + */ + __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296 + * + * cdef int t + * cdef char* f = NULL # <<<<<<<<<<<<<< + * cdef dtype descr = PyArray_DESCR(self) + * cdef int offset + */ + __pyx_v_f = NULL; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297 + * cdef int t + * cdef char* f = NULL + * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< + * cdef int offset + * + */ + __pyx_t_7 = PyArray_DESCR(__pyx_v_self); + __pyx_t_3 = ((PyObject *)__pyx_t_7); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300 + * cdef int offset + * + * info.obj = self # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(descr): + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 + * info.obj = self + * + * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303 + * + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num # <<<<<<<<<<<<<< + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + */ + __pyx_t_4 = __pyx_v_descr->type_num; + __pyx_v_t = __pyx_t_4; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); + if (!__pyx_t_2) { + goto __pyx_L15_next_or; + } else { + } + __pyx_t_2 = (__pyx_v_little_endian != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_L15_next_or:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305 + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + */ + __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 306, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 + * if not PyDataType_HASFIELDS(descr): + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307 + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + */ + switch (__pyx_v_t) { + case NPY_BYTE: + __pyx_v_f = ((char *)"b"); + break; + case NPY_UBYTE: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308 + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + */ + __pyx_v_f = ((char *)"B"); + break; + case NPY_SHORT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309 + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + */ + __pyx_v_f = ((char *)"h"); + break; + case NPY_USHORT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310 + * elif t == NPY_UBYTE: f = "B" + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + */ + __pyx_v_f = ((char *)"H"); + break; + case NPY_INT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311 + * elif t == NPY_SHORT: f = "h" + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + */ + __pyx_v_f = ((char *)"i"); + break; + case NPY_UINT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312 + * elif t == NPY_USHORT: f = "H" + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + */ + __pyx_v_f = ((char *)"I"); + break; + case NPY_LONG: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313 + * elif t == NPY_INT: f = "i" + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + */ + __pyx_v_f = ((char *)"l"); + break; + case NPY_ULONG: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314 + * elif t == NPY_UINT: f = "I" + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + */ + __pyx_v_f = ((char *)"L"); + break; + case NPY_LONGLONG: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315 + * elif t == NPY_LONG: f = "l" + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + */ + __pyx_v_f = ((char *)"q"); + break; + case NPY_ULONGLONG: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316 + * elif t == NPY_ULONG: f = "L" + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + */ + __pyx_v_f = ((char *)"Q"); + break; + case NPY_FLOAT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317 + * elif t == NPY_LONGLONG: f = "q" + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + */ + __pyx_v_f = ((char *)"f"); + break; + case NPY_DOUBLE: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318 + * elif t == NPY_ULONGLONG: f = "Q" + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + */ + __pyx_v_f = ((char *)"d"); + break; + case NPY_LONGDOUBLE: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319 + * elif t == NPY_FLOAT: f = "f" + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + */ + __pyx_v_f = ((char *)"g"); + break; + case NPY_CFLOAT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320 + * elif t == NPY_DOUBLE: f = "d" + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + */ + __pyx_v_f = ((char *)"Zf"); + break; + case NPY_CDOUBLE: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321 + * elif t == NPY_LONGDOUBLE: f = "g" + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" + */ + __pyx_v_f = ((char *)"Zd"); + break; + case NPY_CLONGDOUBLE: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322 + * elif t == NPY_CFLOAT: f = "Zf" + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f = "O" + * else: + */ + __pyx_v_f = ((char *)"Zg"); + break; + case NPY_OBJECT: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323 + * elif t == NPY_CDOUBLE: f = "Zd" + * elif t == NPY_CLONGDOUBLE: f = "Zg" + * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_v_f = ((char *)"O"); + break; + default: + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325 + * elif t == NPY_OBJECT: f = "O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * info.format = f + * return + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 325, __pyx_L1_error) + break; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f # <<<<<<<<<<<<<< + * return + * else: + */ + __pyx_v_info->format = __pyx_v_f; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f + * return # <<<<<<<<<<<<<< + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 + * info.obj = self + * + * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + goto __pyx_L12; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329 + * return + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + */ + /*else*/ { + __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330 + * else: + * info.format = PyObject_Malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, + */ + (__pyx_v_info->format[0]) = '^'; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331 + * info.format = PyObject_Malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 # <<<<<<<<<<<<<< + * f = _util_dtypestring(descr, info.format + 1, + * info.format + _buffer_format_string_len, + */ + __pyx_v_offset = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332 + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< + * info.format + _buffer_format_string_len, + * &offset) + */ + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(4, 332, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335 + * info.format + _buffer_format_string_len, + * &offset) + * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + */ + (__pyx_v_f[0]) = '\x00'; + } + __pyx_L12:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * # experimental exception made for __getbuffer__ and __releasebuffer__ + * # -- the details of this may change. + * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + */ + +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * PyObject_Free(info.strides) + */ + PyObject_Free(__pyx_v_info->format); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * PyObject_Free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341 + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * PyObject_Free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + PyObject_Free(__pyx_v_info->strides); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * PyObject_Free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * PyObject_Free(info.format) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + goto __pyx_L3; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + __pyx_L3:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * return () + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { + PyArray_Descr *__pyx_v_child = 0; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + PyObject *__pyx_v_fields = 0; + PyObject *__pyx_v_childname = NULL; + PyObject *__pyx_v_new_offset = NULL; + PyObject *__pyx_v_t = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("_util_dtypestring", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 + * + * cdef dtype child + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * cdef tuple fields + */ + __pyx_v_endian_detector = 1; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848 + * cdef dtype child + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields + * + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + if (unlikely(__pyx_v_descr->names == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(4, 851, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(4, 851, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 + * + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields + * + */ + if (unlikely(__pyx_v_descr->fields == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(4, 852, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(4, 852, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< + * + * if (end - f) - (new_offset - offset[0]) < 15: + */ + if (likely(__pyx_v_fields != Py_None)) { + PyObject* sequence = __pyx_v_fields; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(4, 853, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(4, 853, __pyx_L1_error) + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(4, 853, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 + * child, new_offset = fields + * + * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 856, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 + * child, new_offset = fields + * + * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); + if (!__pyx_t_7) { + goto __pyx_L8_next_or; + } else { + } + __pyx_t_7 = (__pyx_v_little_endian != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_L8_next_or:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859 + * + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * # One could encode it in the format string and have Cython + */ + __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); + if (__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); + __pyx_t_6 = __pyx_t_7; + __pyx_L7_bool_binop_done:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + if (__pyx_t_6) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860 + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * # One could encode it in the format string and have Cython + * # complain instead, BUT: < and > in format strings also imply + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(4, 860, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870 + * + * # Output padding bytes + * while offset[0] < new_offset: # <<<<<<<<<<<<<< + * f[0] = 120 # "x"; pad byte + * f += 1 + */ + while (1) { + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_6) break; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871 + * # Output padding bytes + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< + * f += 1 + * offset[0] += 1 + */ + (__pyx_v_f[0]) = 0x78; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872 + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte + * f += 1 # <<<<<<<<<<<<<< + * offset[0] += 1 + * + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873 + * f[0] = 120 # "x"; pad byte + * f += 1 + * offset[0] += 1 # <<<<<<<<<<<<<< + * + * offset[0] += child.itemsize + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875 + * offset[0] += 1 + * + * offset[0] += child.itemsize # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(child): + */ + __pyx_t_8 = 0; + (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 + * + * if not PyDataType_HASFIELDS(child): + * t = child.type_num # <<<<<<<<<<<<<< + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 878, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); + __pyx_t_4 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); + if (__pyx_t_6) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(4, 880, __pyx_L1_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883 + * + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 98; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884 + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 66; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885 + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x68; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886 + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 72; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887 + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x69; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888 + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 73; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889 + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x6C; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890 + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 890, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 76; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891 + * elif t == NPY_LONG: f[0] = 108 #"l" + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x71; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892 + * elif t == NPY_ULONG: f[0] = 76 #"L" + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 892, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 81; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893 + * elif t == NPY_LONGLONG: f[0] = 113 #"q" + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x66; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894 + * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x64; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895 + * elif t == NPY_FLOAT: f[0] = 102 #"f" + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 0x67; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896 + * elif t == NPY_DOUBLE: f[0] = 100 #"d" + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 896, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x66; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897 + * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x64; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898 + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + */ + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 898, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 90; + (__pyx_v_f[1]) = 0x67; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899 + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(4, 899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + (__pyx_v_f[0]) = 79; + goto __pyx_L15; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901 + * elif t == NPY_OBJECT: f[0] = 79 #"O" + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * f += 1 + * else: + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(4, 901, __pyx_L1_error) + } + __pyx_L15:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902 + * else: + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * f += 1 # <<<<<<<<<<<<<< + * else: + * # Cython ignores struct boundary information ("T{...}"), + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + goto __pyx_L13; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906 + * # Cython ignores struct boundary information ("T{...}"), + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< + * return f + * + */ + /*else*/ { + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(4, 906, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; + } + __pyx_L13:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907 + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) + * return f # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_f; + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * return () + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_child); + __Pyx_XDECREF(__pyx_v_fields); + __Pyx_XDECREF(__pyx_v_childname); + __Pyx_XDECREF(__pyx_v_new_offset); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * _import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036 + * cdef inline int import_array() except -1: + * try: + * _import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1036, __pyx_L3_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 + * try: + * _import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1037, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + * _import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1038, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1038, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * _import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * _import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1042, __pyx_L3_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1043, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1044, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1044, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 1048, __pyx_L3_error) + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 1049, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 1050, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(4, 1050, __pyx_L5_except_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L8_try_end:; + } + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":93 + * __data_union data + * + * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) { + PyObject *__pyx_v_item_count = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + char *__pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + char __pyx_t_7; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "array.pxd":98 + * # In particular strided access is always provided regardless + * # of flags + * item_count = Py_SIZE(self) # <<<<<<<<<<<<<< + * + * info.suboffsets = NULL + */ + __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_item_count = __pyx_t_1; + __pyx_t_1 = 0; + + /* "array.pxd":100 + * item_count = Py_SIZE(self) + * + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.buf = self.data.as_chars + * info.readonly = 0 + */ + __pyx_v_info->suboffsets = NULL; + + /* "array.pxd":101 + * + * info.suboffsets = NULL + * info.buf = self.data.as_chars # <<<<<<<<<<<<<< + * info.readonly = 0 + * info.ndim = 1 + */ + __pyx_t_2 = __pyx_v_self->data.as_chars; + __pyx_v_info->buf = __pyx_t_2; + + /* "array.pxd":102 + * info.suboffsets = NULL + * info.buf = self.data.as_chars + * info.readonly = 0 # <<<<<<<<<<<<<< + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + */ + __pyx_v_info->readonly = 0; + + /* "array.pxd":103 + * info.buf = self.data.as_chars + * info.readonly = 0 + * info.ndim = 1 # <<<<<<<<<<<<<< + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + * info.len = info.itemsize * item_count + */ + __pyx_v_info->ndim = 1; + + /* "array.pxd":104 + * info.readonly = 0 + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<< + * info.len = info.itemsize * item_count + * + */ + __pyx_t_3 = __pyx_v_self->ob_descr->itemsize; + __pyx_v_info->itemsize = __pyx_t_3; + + /* "array.pxd":105 + * info.ndim = 1 + * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) + * info.len = info.itemsize * item_count # <<<<<<<<<<<<<< + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + */ + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(5, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_info->len = __pyx_t_5; + + /* "array.pxd":107 + * info.len = info.itemsize * item_count + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<< + * if not info.shape: + * raise MemoryError() + */ + __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2))); + + /* "array.pxd":108 + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: # <<<<<<<<<<<<<< + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + */ + __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0); + if (__pyx_t_6) { + + /* "array.pxd":109 + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: + * raise MemoryError() # <<<<<<<<<<<<<< + * info.shape[0] = item_count # constant regardless of resizing + * info.strides = &info.itemsize + */ + PyErr_NoMemory(); __PYX_ERR(5, 109, __pyx_L1_error) + + /* "array.pxd":108 + * + * info.shape = PyObject_Malloc(sizeof(Py_ssize_t) + 2) + * if not info.shape: # <<<<<<<<<<<<<< + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + */ + } + + /* "array.pxd":110 + * if not info.shape: + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<< + * info.strides = &info.itemsize + * + */ + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(5, 110, __pyx_L1_error) + (__pyx_v_info->shape[0]) = __pyx_t_5; + + /* "array.pxd":111 + * raise MemoryError() + * info.shape[0] = item_count # constant regardless of resizing + * info.strides = &info.itemsize # <<<<<<<<<<<<<< + * + * info.format = (info.shape + 1) + */ + __pyx_v_info->strides = (&__pyx_v_info->itemsize); + + /* "array.pxd":113 + * info.strides = &info.itemsize + * + * info.format = (info.shape + 1) # <<<<<<<<<<<<<< + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 + */ + __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1)); + + /* "array.pxd":114 + * + * info.format = (info.shape + 1) + * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<< + * info.format[1] = 0 + * info.obj = self + */ + __pyx_t_7 = __pyx_v_self->ob_descr->typecode; + (__pyx_v_info->format[0]) = __pyx_t_7; + + /* "array.pxd":115 + * info.format = (info.shape + 1) + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 # <<<<<<<<<<<<<< + * info.obj = self + * + */ + (__pyx_v_info->format[1]) = 0; + + /* "array.pxd":116 + * info.format[0] = self.ob_descr.typecode + * info.format[1] = 0 + * info.obj = self # <<<<<<<<<<<<<< + * + * def __releasebuffer__(self, Py_buffer* info): + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "array.pxd":93 + * __data_union data + * + * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< + * # This implementation of getbuffer is geared towards Cython + * # requirements, and does not yet fulfill the PEP. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_XDECREF(__pyx_v_item_count); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":118 + * info.obj = self + * + * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< + * PyObject_Free(info.shape) + * + */ + +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__", 0); + + /* "array.pxd":119 + * + * def __releasebuffer__(self, Py_buffer* info): + * PyObject_Free(info.shape) # <<<<<<<<<<<<<< + * + * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr) + */ + PyObject_Free(__pyx_v_info->shape); + + /* "array.pxd":118 + * info.obj = self + * + * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<< + * PyObject_Free(info.shape) + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "array.pxd":130 + * + * + * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< + * """ fast creation of a new array, given a template array. + * type will be same as template. + */ + +static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) { + arrayobject *__pyx_v_op = NULL; + arrayobject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("clone", 0); + + /* "array.pxd":134 + * type will be same as template. + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<< + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + */ + __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_op = ((arrayobject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "array.pxd":135 + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: # <<<<<<<<<<<<<< + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op + */ + __pyx_t_3 = (__pyx_v_zero != 0); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None); + __pyx_t_4 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "array.pxd":136 + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<< + * return op + * + */ + (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize))); + + /* "array.pxd":135 + * if zero is true, new array will be initialized with zeroes.""" + * op = newarrayobject(Py_TYPE(template), length, template.ob_descr) + * if zero and op is not None: # <<<<<<<<<<<<<< + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op + */ + } + + /* "array.pxd":137 + * if zero and op is not None: + * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) + * return op # <<<<<<<<<<<<<< + * + * cdef inline array copy(array self): + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_op)); + __pyx_r = __pyx_v_op; + goto __pyx_L0; + + /* "array.pxd":130 + * + * + * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<< + * """ fast creation of a new array, given a template array. + * type will be same as template. + */ + + /* function exit code */ + __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_op); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":139 + * return op + * + * cdef inline array copy(array self): # <<<<<<<<<<<<<< + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + */ + +static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) { + arrayobject *__pyx_v_op = NULL; + arrayobject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("copy", 0); + + /* "array.pxd":141 + * cdef inline array copy(array self): + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<< + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) + * return op + */ + __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_op = ((arrayobject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "array.pxd":142 + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<< + * return op + * + */ + (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize))); + + /* "array.pxd":143 + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) + * return op # <<<<<<<<<<<<<< + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_op)); + __pyx_r = __pyx_v_op; + goto __pyx_L0; + + /* "array.pxd":139 + * return op + * + * cdef inline array copy(array self): # <<<<<<<<<<<<<< + * """ make a copy of an array. """ + * op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) + */ + + /* function exit code */ + __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_op); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":145 + * return op + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< + * """ efficient appending of new stuff of same type + * (e.g. of same array type) + */ + +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) { + Py_ssize_t __pyx_v_itemsize; + Py_ssize_t __pyx_v_origsize; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("extend_buffer", 0); + + /* "array.pxd":149 + * (e.g. of same array type) + * n: number of elements (not number of bytes!) """ + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<< + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) + */ + __pyx_t_1 = __pyx_v_self->ob_descr->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "array.pxd":150 + * n: number of elements (not number of bytes!) """ + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize + * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<< + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + */ + __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self)); + + /* "array.pxd":151 + * cdef Py_ssize_t itemsize = self.ob_descr.itemsize + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) # <<<<<<<<<<<<<< + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + * return 0 + */ + __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 151, __pyx_L1_error) + + /* "array.pxd":152 + * cdef Py_ssize_t origsize = Py_SIZE(self) + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<< + * return 0 + * + */ + (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize))); + + /* "array.pxd":153 + * resize_smart(self, origsize + n) + * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) + * return 0 # <<<<<<<<<<<<<< + * + * cdef inline int extend(array self, array other) except -1: + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "array.pxd":145 + * return op + * + * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<< + * """ efficient appending of new stuff of same type + * (e.g. of same array type) + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":155 + * return 0 + * + * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + */ + +static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("extend", 0); + + /* "array.pxd":157 + * cdef inline int extend(array self, array other) except -1: + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + */ + __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0); + if (__pyx_t_1) { + + /* "array.pxd":158 + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + * PyErr_BadArgument() # <<<<<<<<<<<<<< + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + */ + __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(5, 158, __pyx_L1_error) + + /* "array.pxd":157 + * cdef inline int extend(array self, array other) except -1: + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<< + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + */ + } + + /* "array.pxd":159 + * if self.ob_descr.typecode != other.ob_descr.typecode: + * PyErr_BadArgument() + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<< + * + * cdef inline void zero(array self): + */ + __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 159, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "array.pxd":155 + * return 0 + * + * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<< + * """ extend array with data from another array; types must match. """ + * if self.ob_descr.typecode != other.ob_descr.typecode: + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "array.pxd":161 + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + * cdef inline void zero(array self): # <<<<<<<<<<<<<< + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) + */ + +static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("zero", 0); + + /* "array.pxd":163 + * cdef inline void zero(array self): + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<< + */ + (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize))); + + /* "array.pxd":161 + * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) + * + * cdef inline void zero(array self): # <<<<<<<<<<<<<< + * """ set all elements of array to zero. """ + * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_std__in_string") + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + +static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v_o) { + Py_ssize_t __pyx_v_length; + char const *__pyx_v_data; + std::string __pyx_r; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_std__in_string", 0); + + /* "string.from_py":15 + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<< + * return string(data, length) + * + */ + __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(1, 15, __pyx_L1_error) + __pyx_v_data = __pyx_t_1; + + /* "string.from_py":16 + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * return string(data, length) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = std::string(__pyx_v_data, __pyx_v_length); + goto __pyx_L0; + + /* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_std__in_string") + * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_std_3a__3a_string") + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + std::string __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_string", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((std::string)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_std_3a__3a_string") + * cdef vector[X] __pyx_convert_vector_from_py_std_3a__3a_string(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":31 + * + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0); + + /* "string.to_py":32 + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":31 + * + * @cname("__pyx_convert_PyObject_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":37 + * + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0); + + /* "string.to_py":38 + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":37 + * + * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":43 + * + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0); + + /* "string.to_py":44 + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":43 + * + * @cname("__pyx_convert_PyStr_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":49 + * + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0); + + /* "string.to_py":50 + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * cdef extern from *: + * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":49 + * + * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) + * cdef extern from *: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "string.to_py":55 + * + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) + * + */ + +static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0); + + /* "string.to_py":56 + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "string.to_py":55 + * + * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string") + * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<< + * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_unsigned_int(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_unsigned_int", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_unsigned_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_std_3a__3a_string") + * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_std_3a__3a_string") + * cdef object __pyx_convert_vector_to_py_std_3a__3a_string(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "pair.to_py":158 + * + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): # <<<<<<<<<<<<<< + * return p.first, p.second + * + */ + +static PyObject *__pyx_convert_pair_to_py_float____std_3a__3a_string(std::pair const &__pyx_v_p) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py_float____std_3a__3a_string", 0); + + /* "pair.to_py":159 + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): + * return p.first, p.second # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "pair.to_py":158 + * + * @cname("__pyx_convert_pair_to_py_float____std_3a__3a_string") + * cdef object __pyx_convert_pair_to_py_float____std_3a__3a_string(const pair[X,Y]& p): # <<<<<<<<<<<<<< + * return p.first, p.second + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("pair.to_py.__pyx_convert_pair_to_py_float____std_3a__3a_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_float(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_float", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_float") + * cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_unsigned_short(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_unsigned_short", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_unsigned_short") + * cdef object __pyx_convert_vector_to_py_unsigned_short(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_short((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_unsigned_short") + * cdef object __pyx_convert_vector_to_py_unsigned_short(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_unsigned_short", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_int") + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((int)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_int") + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + +static PyObject *__pyx_convert_vector_to_py_int(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_dbr_long_t(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_dbr_long_t", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = __Pyx_PyInt_From_dbr_long_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_dbr_long_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_convert_vector_to_py_double(const std::vector &__pyx_v_v) { + size_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + size_t __pyx_t_2; + size_t __pyx_t_3; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_double", 0); + + /* "vector.to_py":61 + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): + * return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":60 + * + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): # <<<<<<<<<<<<<< + * return [v[i] for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_char__const___2a_") + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + char const *__pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_char__const___2a_", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_item); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((char const *)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_char__const___2a_") + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_char__const___2a_", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_double(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + double __pyx_t_5; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 47, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "vector.from_py":48 + * cdef vector[X] v + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error) + __pyx_v_v.push_back(((double)__pyx_t_5)); + + /* "vector.from_py":47 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":49 + * for item in o: + * v.push_back(item) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":45 + * + * @cname("__pyx_convert_vector_from_py_double") + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: # <<<<<<<<<<<<<< + * cdef vector[X] v + * for item in o: + */ + + /* function exit code */ + __Pyx_pretend_to_initialize(&__pyx_r); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + +/* Python wrapper */ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_shape = 0; + Py_ssize_t __pyx_v_itemsize; + PyObject *__pyx_v_format = 0; + PyObject *__pyx_v_mode = 0; + int __pyx_v_allocate_buffer; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[3] = ((PyObject *)__pyx_n_s_c); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 122, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_shape = ((PyObject*)values[0]); + __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error) + __pyx_v_format = values[2]; + __pyx_v_mode = values[3]; + if (values[4]) { + __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error) + } else { + + /* "View.MemoryView":123 + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, + * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<< + * + * cdef int idx + */ + __pyx_v_allocate_buffer = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 122, __pyx_L1_error) + if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 122, __pyx_L1_error) + } + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer); + + /* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) { + int __pyx_v_idx; + Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_dim; + PyObject **__pyx_v_p; + char __pyx_v_order; + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + char *__pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + Py_ssize_t __pyx_t_11; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_format); + + /* "View.MemoryView":129 + * cdef PyObject **p + * + * self.ndim = len(shape) # <<<<<<<<<<<<<< + * self.itemsize = itemsize + * + */ + if (unlikely(__pyx_v_shape == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 129, __pyx_L1_error) + } + __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error) + __pyx_v_self->ndim = ((int)__pyx_t_1); + + /* "View.MemoryView":130 + * + * self.ndim = len(shape) + * self.itemsize = itemsize # <<<<<<<<<<<<<< + * + * if not self.ndim: + */ + __pyx_v_self->itemsize = __pyx_v_itemsize; + + /* "View.MemoryView":132 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError("Empty shape tuple for cython.array") + * + */ + __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":133 + * + * if not self.ndim: + * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< + * + * if itemsize <= 0: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 133, __pyx_L1_error) + + /* "View.MemoryView":132 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError("Empty shape tuple for cython.array") + * + */ + } + + /* "View.MemoryView":135 + * raise ValueError("Empty shape tuple for cython.array") + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError("itemsize <= 0 for cython.array") + * + */ + __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":136 + * + * if itemsize <= 0: + * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 136, __pyx_L1_error) + + /* "View.MemoryView":135 + * raise ValueError("Empty shape tuple for cython.array") + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError("itemsize <= 0 for cython.array") + * + */ + } + + /* "View.MemoryView":138 + * raise ValueError("itemsize <= 0 for cython.array") + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + */ + __pyx_t_2 = PyBytes_Check(__pyx_v_format); + __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":139 + * + * if not isinstance(format, bytes): + * format = format.encode('ASCII') # <<<<<<<<<<<<<< + * self._format = format # keep a reference to the byte string + * self.format = self._format + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":138 + * raise ValueError("itemsize <= 0 for cython.array") + * + * if not isinstance(format, bytes): # <<<<<<<<<<<<<< + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + */ + } + + /* "View.MemoryView":140 + * if not isinstance(format, bytes): + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<< + * self.format = self._format + * + */ + if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 140, __pyx_L1_error) + __pyx_t_3 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(__pyx_v_self->_format); + __pyx_v_self->_format = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":141 + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + * self.format = self._format # <<<<<<<<<<<<<< + * + * + */ + if (unlikely(__pyx_v_self->_format == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(1, 141, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error) + __pyx_v_self->format = __pyx_t_7; + + /* "View.MemoryView":144 + * + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< + * self._strides = self._shape + self.ndim + * + */ + __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); + + /* "View.MemoryView":145 + * + * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) + * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<< + * + * if not self._shape: + */ + __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim); + + /* "View.MemoryView":147 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate shape and strides.") + * + */ + __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":148 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 148, __pyx_L1_error) + + /* "View.MemoryView":147 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate shape and strides.") + * + */ + } + + /* "View.MemoryView":151 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + __pyx_t_8 = 0; + __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 151, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_9; + __pyx_v_idx = __pyx_t_8; + __pyx_t_8 = (__pyx_t_8 + 1); + + /* "View.MemoryView":152 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim + */ + __pyx_t_4 = ((__pyx_v_dim <= 0) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":153 + * for idx, dim in enumerate(shape): + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<< + * self._shape[idx] = dim + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 153, __pyx_L1_error) + + /* "View.MemoryView":152 + * + * for idx, dim in enumerate(shape): + * if dim <= 0: # <<<<<<<<<<<<<< + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim + */ + } + + /* "View.MemoryView":154 + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + * self._shape[idx] = dim # <<<<<<<<<<<<<< + * + * cdef char order + */ + (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim; + + /* "View.MemoryView":151 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":157 + * + * cdef char order + * if mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error) + if (__pyx_t_4) { + + /* "View.MemoryView":158 + * cdef char order + * if mode == 'fortran': + * order = b'F' # <<<<<<<<<<<<<< + * self.mode = u'fortran' + * elif mode == 'c': + */ + __pyx_v_order = 'F'; + + /* "View.MemoryView":159 + * if mode == 'fortran': + * order = b'F' + * self.mode = u'fortran' # <<<<<<<<<<<<<< + * elif mode == 'c': + * order = b'C' + */ + __Pyx_INCREF(__pyx_n_u_fortran); + __Pyx_GIVEREF(__pyx_n_u_fortran); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_n_u_fortran; + + /* "View.MemoryView":157 + * + * cdef char order + * if mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":160 + * order = b'F' + * self.mode = u'fortran' + * elif mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' + */ + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error) + if (likely(__pyx_t_4)) { + + /* "View.MemoryView":161 + * self.mode = u'fortran' + * elif mode == 'c': + * order = b'C' # <<<<<<<<<<<<<< + * self.mode = u'c' + * else: + */ + __pyx_v_order = 'C'; + + /* "View.MemoryView":162 + * elif mode == 'c': + * order = b'C' + * self.mode = u'c' # <<<<<<<<<<<<<< + * else: + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) + */ + __Pyx_INCREF(__pyx_n_u_c); + __Pyx_GIVEREF(__pyx_n_u_c); + __Pyx_GOTREF(__pyx_v_self->mode); + __Pyx_DECREF(__pyx_v_self->mode); + __pyx_v_self->mode = __pyx_n_u_c; + + /* "View.MemoryView":160 + * order = b'F' + * self.mode = u'fortran' + * elif mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":164 + * self.mode = u'c' + * else: + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<< + * + * self.len = fill_contig_strides_array(self._shape, self._strides, + */ + /*else*/ { + __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 164, __pyx_L1_error) + } + __pyx_L10:; + + /* "View.MemoryView":166 + * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) + * + * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<< + * itemsize, self.ndim, order) + * + */ + __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order); + + /* "View.MemoryView":169 + * itemsize, self.ndim, order) + * + * self.free_data = allocate_buffer # <<<<<<<<<<<<<< + * self.dtype_is_object = format == b'O' + * if allocate_buffer: + */ + __pyx_v_self->free_data = __pyx_v_allocate_buffer; + + /* "View.MemoryView":170 + * + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< + * if allocate_buffer: + * + */ + __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_4; + + /* "View.MemoryView":171 + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' + * if allocate_buffer: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_4 = (__pyx_v_allocate_buffer != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":174 + * + * + * self.data = malloc(self.len) # <<<<<<<<<<<<<< + * if not self.data: + * raise MemoryError("unable to allocate array data.") + */ + __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len)); + + /* "View.MemoryView":175 + * + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate array data.") + * + */ + __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":176 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __PYX_ERR(1, 176, __pyx_L1_error) + + /* "View.MemoryView":175 + * + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate array data.") + * + */ + } + + /* "View.MemoryView":178 + * raise MemoryError("unable to allocate array data.") + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len / itemsize): + */ + __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":179 + * + * if self.dtype_is_object: + * p = self.data # <<<<<<<<<<<<<< + * for i in range(self.len / itemsize): + * p[i] = Py_None + */ + __pyx_v_p = ((PyObject **)__pyx_v_self->data); + + /* "View.MemoryView":180 + * if self.dtype_is_object: + * p = self.data + * for i in range(self.len / itemsize): # <<<<<<<<<<<<<< + * p[i] = Py_None + * Py_INCREF(Py_None) + */ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 180, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 180, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize); + __pyx_t_9 = __pyx_t_1; + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "View.MemoryView":181 + * p = self.data + * for i in range(self.len / itemsize): + * p[i] = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + (__pyx_v_p[__pyx_v_i]) = Py_None; + + /* "View.MemoryView":182 + * for i in range(self.len / itemsize): + * p[i] = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + Py_INCREF(Py_None); + } + + /* "View.MemoryView":178 + * raise MemoryError("unable to allocate array data.") + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len / itemsize): + */ + } + + /* "View.MemoryView":171 + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' + * if allocate_buffer: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":122 + * cdef bint dtype_is_object + * + * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<< + * mode="c", bint allocate_buffer=True): + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_format); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":185 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * cdef int bufmode = -1 + * if self.mode == u"c": + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_v_bufmode; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + Py_ssize_t *__pyx_t_7; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":186 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 # <<<<<<<<<<<<<< + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + */ + __pyx_v_bufmode = -1; + + /* "View.MemoryView":187 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + */ + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":188 + * cdef int bufmode = -1 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + */ + __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":187 + * def __getbuffer__(self, Py_buffer *info, int flags): + * cdef int bufmode = -1 + * if self.mode == u"c": # <<<<<<<<<<<<<< + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + */ + goto __pyx_L3; + } + + /* "View.MemoryView":189 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + */ + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":190 + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") + */ + __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS); + + /* "View.MemoryView":189 + * if self.mode == u"c": + * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * elif self.mode == u"fortran": # <<<<<<<<<<<<<< + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + */ + } + __pyx_L3:; + + /* "View.MemoryView":191 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + */ + __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":192 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 192, __pyx_L1_error) + + /* "View.MemoryView":191 + * elif self.mode == u"fortran": + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): # <<<<<<<<<<<<<< + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + */ + } + + /* "View.MemoryView":193 + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data # <<<<<<<<<<<<<< + * info.len = self.len + * info.ndim = self.ndim + */ + __pyx_t_4 = __pyx_v_self->data; + __pyx_v_info->buf = __pyx_t_4; + + /* "View.MemoryView":194 + * raise ValueError("Can only create a buffer that is contiguous in memory.") + * info.buf = self.data + * info.len = self.len # <<<<<<<<<<<<<< + * info.ndim = self.ndim + * info.shape = self._shape + */ + __pyx_t_5 = __pyx_v_self->len; + __pyx_v_info->len = __pyx_t_5; + + /* "View.MemoryView":195 + * info.buf = self.data + * info.len = self.len + * info.ndim = self.ndim # <<<<<<<<<<<<<< + * info.shape = self._shape + * info.strides = self._strides + */ + __pyx_t_6 = __pyx_v_self->ndim; + __pyx_v_info->ndim = __pyx_t_6; + + /* "View.MemoryView":196 + * info.len = self.len + * info.ndim = self.ndim + * info.shape = self._shape # <<<<<<<<<<<<<< + * info.strides = self._strides + * info.suboffsets = NULL + */ + __pyx_t_7 = __pyx_v_self->_shape; + __pyx_v_info->shape = __pyx_t_7; + + /* "View.MemoryView":197 + * info.ndim = self.ndim + * info.shape = self._shape + * info.strides = self._strides # <<<<<<<<<<<<<< + * info.suboffsets = NULL + * info.itemsize = self.itemsize + */ + __pyx_t_7 = __pyx_v_self->_strides; + __pyx_v_info->strides = __pyx_t_7; + + /* "View.MemoryView":198 + * info.shape = self._shape + * info.strides = self._strides + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * info.itemsize = self.itemsize + * info.readonly = 0 + */ + __pyx_v_info->suboffsets = NULL; + + /* "View.MemoryView":199 + * info.strides = self._strides + * info.suboffsets = NULL + * info.itemsize = self.itemsize # <<<<<<<<<<<<<< + * info.readonly = 0 + * + */ + __pyx_t_5 = __pyx_v_self->itemsize; + __pyx_v_info->itemsize = __pyx_t_5; + + /* "View.MemoryView":200 + * info.suboffsets = NULL + * info.itemsize = self.itemsize + * info.readonly = 0 # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":202 + * info.readonly = 0 + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.format + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":203 + * + * if flags & PyBUF_FORMAT: + * info.format = self.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL + */ + __pyx_t_4 = __pyx_v_self->format; + __pyx_v_info->format = __pyx_t_4; + + /* "View.MemoryView":202 + * info.readonly = 0 + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.format + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":205 + * info.format = self.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.obj = self + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L5:; + + /* "View.MemoryView":207 + * info.format = NULL + * + * info.obj = self # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":185 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * cdef int bufmode = -1 + * if self.mode == u"c": + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":211 + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + */ + +/* Python wrapper */ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_array___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":212 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data: + */ + __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":213 + * def __dealloc__(array self): + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) # <<<<<<<<<<<<<< + * elif self.free_data: + * if self.dtype_is_object: + */ + __pyx_v_self->callback_free_data(__pyx_v_self->data); + + /* "View.MemoryView":212 + * + * def __dealloc__(array self): + * if self.callback_free_data != NULL: # <<<<<<<<<<<<<< + * self.callback_free_data(self.data) + * elif self.free_data: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":214 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, + */ + __pyx_t_1 = (__pyx_v_self->free_data != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":215 + * self.callback_free_data(self.data) + * elif self.free_data: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + */ + __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":216 + * elif self.free_data: + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<< + * self._strides, self.ndim, False) + * free(self.data) + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0); + + /* "View.MemoryView":215 + * self.callback_free_data(self.data) + * elif self.free_data: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + */ + } + + /* "View.MemoryView":218 + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + * free(self.data) # <<<<<<<<<<<<<< + * PyObject_Free(self._shape) + * + */ + free(__pyx_v_self->data); + + /* "View.MemoryView":214 + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + * elif self.free_data: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * refcount_objects_in_slice(self.data, self._shape, + */ + } + __pyx_L3:; + + /* "View.MemoryView":219 + * self._strides, self.ndim, False) + * free(self.data) + * PyObject_Free(self._shape) # <<<<<<<<<<<<<< + * + * @property + */ + PyObject_Free(__pyx_v_self->_shape); + + /* "View.MemoryView":211 + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + * + * def __dealloc__(array self): # <<<<<<<<<<<<<< + * if self.callback_free_data != NULL: + * self.callback_free_data(self.data) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":222 + * + * @property + * def memview(self): # <<<<<<<<<<<<<< + * return self.get_memview() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":223 + * @property + * def memview(self): + * return self.get_memview() # <<<<<<<<<<<<<< + * + * @cname('get_memview') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":222 + * + * @property + * def memview(self): # <<<<<<<<<<<<<< + * return self.get_memview() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":226 + * + * @cname('get_memview') + * cdef get_memview(self): # <<<<<<<<<<<<<< + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) + */ + +static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("get_memview", 0); + + /* "View.MemoryView":227 + * @cname('get_memview') + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<< + * return memoryview(self, flags, self.dtype_is_object) + * + */ + __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE); + + /* "View.MemoryView":228 + * cdef get_memview(self): + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * def __len__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":226 + * + * @cname('get_memview') + * cdef get_memview(self): # <<<<<<<<<<<<<< + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":230 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * + */ + +/* Python wrapper */ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__", 0); + + /* "View.MemoryView":231 + * + * def __len__(self): + * return self._shape[0] # <<<<<<<<<<<<<< + * + * def __getattr__(self, attr): + */ + __pyx_r = (__pyx_v_self->_shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":230 + * return memoryview(self, flags, self.dtype_is_object) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._shape[0] + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":233 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/ +static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__getattr__", 0); + + /* "View.MemoryView":234 + * + * def __getattr__(self, attr): + * return getattr(self.memview, attr) # <<<<<<<<<<<<<< + * + * def __getitem__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":233 + * return self._shape[0] + * + * def __getattr__(self, attr): # <<<<<<<<<<<<<< + * return getattr(self.memview, attr) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":236 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * + */ + +/* Python wrapper */ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":237 + * + * def __getitem__(self, item): + * return self.memview[item] # <<<<<<<<<<<<<< + * + * def __setitem__(self, item, value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":236 + * return getattr(self.memview, attr) + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.memview[item] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":239 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * + */ + +/* Python wrapper */ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setitem__", 0); + + /* "View.MemoryView":240 + * + * def __setitem__(self, item, value): + * self.memview[item] = value # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":239 + * return self.memview[item] + * + * def __setitem__(self, item, value): # <<<<<<<<<<<<<< + * self.memview[item] = value + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":244 + * + * @cname("__pyx_array_new") + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< + * char *mode, char *buf): + * cdef array result + */ + +static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) { + struct __pyx_array_obj *__pyx_v_result = 0; + struct __pyx_array_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("array_cwrapper", 0); + + /* "View.MemoryView":248 + * cdef array result + * + * if buf == NULL: # <<<<<<<<<<<<<< + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + */ + __pyx_t_1 = ((__pyx_v_buf == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":249 + * + * if buf == NULL: + * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<< + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), + */ + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":248 + * cdef array result + * + * if buf == NULL: # <<<<<<<<<<<<<< + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":251 + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< + * allocate_buffer=False) + * result.data = buf + */ + /*else*/ { + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_shape); + __Pyx_GIVEREF(__pyx_v_shape); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_3 = 0; + + /* "View.MemoryView":252 + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), + * allocate_buffer=False) # <<<<<<<<<<<<<< + * result.data = buf + * + */ + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error) + + /* "View.MemoryView":251 + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<< + * allocate_buffer=False) + * result.data = buf + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":253 + * result = array(shape, itemsize, format, mode.decode('ASCII'), + * allocate_buffer=False) + * result.data = buf # <<<<<<<<<<<<<< + * + * return result + */ + __pyx_v_result->data = __pyx_v_buf; + } + __pyx_L3:; + + /* "View.MemoryView":255 + * result.data = buf + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":244 + * + * @cname("__pyx_array_new") + * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<< + * char *mode, char *buf): + * cdef array result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":281 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): + */ + +/* Python wrapper */ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_4,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_4)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 281, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_name = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + + /* "View.MemoryView":282 + * cdef object name + * def __init__(self, name): + * self.name = name # <<<<<<<<<<<<<< + * def __repr__(self): + * return self.name + */ + __Pyx_INCREF(__pyx_v_name); + __Pyx_GIVEREF(__pyx_v_name); + __Pyx_GOTREF(__pyx_v_self->name); + __Pyx_DECREF(__pyx_v_self->name); + __pyx_v_self->name = __pyx_v_name; + + /* "View.MemoryView":281 + * cdef class Enum(object): + * cdef object name + * def __init__(self, name): # <<<<<<<<<<<<<< + * self.name = name + * def __repr__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":283 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * + */ + +/* Python wrapper */ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":284 + * self.name = name + * def __repr__(self): + * return self.name # <<<<<<<<<<<<<< + * + * cdef generic = Enum("") + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->name); + __pyx_r = __pyx_v_self->name; + goto __pyx_L0; + + /* "View.MemoryView":283 + * def __init__(self, name): + * self.name = name + * def __repr__(self): # <<<<<<<<<<<<<< + * return self.name + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.name,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __pyx_t_2 = (__pyx_v__dict != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.name is not None + */ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.name,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.name is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + */ + /*else*/ { + __pyx_t_3 = (__pyx_v_self->name != Py_None); + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + */ + __pyx_t_3 = (__pyx_v_use_setstate != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":13 + * use_setstate = self.name is not None + * if use_setstate: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_184977713); + __Pyx_GIVEREF(__pyx_int_184977713); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.name is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_184977713); + __Pyx_GIVEREF(__pyx_int_184977713); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":298 + * + * @cname('__pyx_align_pointer') + * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory + */ + +static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) { + Py_intptr_t __pyx_v_aligned_p; + size_t __pyx_v_offset; + void *__pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":300 + * cdef void *align_pointer(void *memory, size_t alignment) nogil: + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory # <<<<<<<<<<<<<< + * cdef size_t offset + * + */ + __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory); + + /* "View.MemoryView":304 + * + * with cython.cdivision(True): + * offset = aligned_p % alignment # <<<<<<<<<<<<<< + * + * if offset > 0: + */ + __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment); + + /* "View.MemoryView":306 + * offset = aligned_p % alignment + * + * if offset > 0: # <<<<<<<<<<<<<< + * aligned_p += alignment - offset + * + */ + __pyx_t_1 = ((__pyx_v_offset > 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":307 + * + * if offset > 0: + * aligned_p += alignment - offset # <<<<<<<<<<<<<< + * + * return aligned_p + */ + __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset)); + + /* "View.MemoryView":306 + * offset = aligned_p % alignment + * + * if offset > 0: # <<<<<<<<<<<<<< + * aligned_p += alignment - offset + * + */ + } + + /* "View.MemoryView":309 + * aligned_p += alignment - offset + * + * return aligned_p # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((void *)__pyx_v_aligned_p); + goto __pyx_L0; + + /* "View.MemoryView":298 + * + * @cname('__pyx_align_pointer') + * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<< + * "Align pointer memory on a given boundary" + * cdef Py_intptr_t aligned_p = memory + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":345 + * cdef __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags + */ + +/* Python wrapper */ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_obj = 0; + int __pyx_v_flags; + int __pyx_v_dtype_is_object; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 345, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_obj = values[0]; + __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error) + if (values[2]) { + __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error) + } else { + __pyx_v_dtype_is_object = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "View.MemoryView":346 + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj # <<<<<<<<<<<<<< + * self.flags = flags + * if type(self) is memoryview or obj is not None: + */ + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + __Pyx_GOTREF(__pyx_v_self->obj); + __Pyx_DECREF(__pyx_v_self->obj); + __pyx_v_self->obj = __pyx_v_obj; + + /* "View.MemoryView":347 + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + * self.obj = obj + * self.flags = flags # <<<<<<<<<<<<<< + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + */ + __pyx_v_self->flags = __pyx_v_flags; + + /* "View.MemoryView":348 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + */ + __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_obj != Py_None); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "View.MemoryView":349 + * self.flags = flags + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<< + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + */ + __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error) + + /* "View.MemoryView":350 + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) + */ + __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":351 + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None; + + /* "View.MemoryView":352 + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * global __pyx_memoryview_thread_locks_used + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":350 + * if type(self) is memoryview or obj is not None: + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) + */ + } + + /* "View.MemoryView":348 + * self.obj = obj + * self.flags = flags + * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<< + * __Pyx_GetBuffer(obj, &self.view, flags) + * if self.view.obj == NULL: + */ + } + + /* "View.MemoryView":355 + * + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + */ + __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":356 + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + */ + __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + + /* "View.MemoryView":357 + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<< + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + */ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1); + + /* "View.MemoryView":355 + * + * global __pyx_memoryview_thread_locks_used + * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<< + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + */ + } + + /* "View.MemoryView":358 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + */ + __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":359 + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< + * if self.lock is NULL: + * raise MemoryError + */ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "View.MemoryView":360 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":361 + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error) + + /* "View.MemoryView":360 + * if self.lock is NULL: + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + } + + /* "View.MemoryView":358 + * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + * __pyx_memoryview_thread_locks_used += 1 + * if self.lock is NULL: # <<<<<<<<<<<<<< + * self.lock = PyThread_allocate_lock() + * if self.lock is NULL: + */ + } + + /* "View.MemoryView":363 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":364 + * + * if flags & PyBUF_FORMAT: + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<< + * else: + * self.dtype_is_object = dtype_is_object + */ + __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_v_self->dtype_is_object = __pyx_t_1; + + /* "View.MemoryView":363 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + */ + goto __pyx_L10; + } + + /* "View.MemoryView":366 + * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + * else: + * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<< + * + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( + */ + /*else*/ { + __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object; + } + __pyx_L10:; + + /* "View.MemoryView":368 + * self.dtype_is_object = dtype_is_object + * + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<< + * &self.acquisition_count[0], sizeof(__pyx_atomic_int)) + * self.typeinfo = NULL + */ + __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int)))); + + /* "View.MemoryView":370 + * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( + * &self.acquisition_count[0], sizeof(__pyx_atomic_int)) + * self.typeinfo = NULL # <<<<<<<<<<<<<< + * + * def __dealloc__(memoryview self): + */ + __pyx_v_self->typeinfo = NULL; + + /* "View.MemoryView":345 + * cdef __Pyx_TypeInfo *typeinfo + * + * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<< + * self.obj = obj + * self.flags = flags + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":372 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) + */ + +/* Python wrapper */ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) { + int __pyx_v_i; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyThread_type_lock __pyx_t_6; + PyThread_type_lock __pyx_t_7; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":373 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * __Pyx_ReleaseBuffer(&self.view) + * + */ + __pyx_t_1 = (__pyx_v_self->obj != Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":374 + * def __dealloc__(memoryview self): + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< + * + * cdef int i + */ + __Pyx_ReleaseBuffer((&__pyx_v_self->view)); + + /* "View.MemoryView":373 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * __Pyx_ReleaseBuffer(&self.view) + * + */ + } + + /* "View.MemoryView":378 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + */ + __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":379 + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<< + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + */ + __pyx_t_3 = __pyx_memoryview_thread_locks_used; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":380 + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + */ + __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":381 + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<< + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + */ + __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1); + + /* "View.MemoryView":382 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + */ + __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":384 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<< + * break + * else: + */ + __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]); + __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]); + + /* "View.MemoryView":383 + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break + */ + (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6; + (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7; + + /* "View.MemoryView":382 + * if __pyx_memoryview_thread_locks[i] is self.lock: + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + */ + } + + /* "View.MemoryView":385 + * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + * break # <<<<<<<<<<<<<< + * else: + * PyThread_free_lock(self.lock) + */ + goto __pyx_L6_break; + + /* "View.MemoryView":380 + * if self.lock != NULL: + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<< + * __pyx_memoryview_thread_locks_used -= 1 + * if i != __pyx_memoryview_thread_locks_used: + */ + } + } + /*else*/ { + + /* "View.MemoryView":387 + * break + * else: + * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + */ + PyThread_free_lock(__pyx_v_self->lock); + } + __pyx_L6_break:; + + /* "View.MemoryView":378 + * cdef int i + * global __pyx_memoryview_thread_locks_used + * if self.lock != NULL: # <<<<<<<<<<<<<< + * for i in range(__pyx_memoryview_thread_locks_used): + * if __pyx_memoryview_thread_locks[i] is self.lock: + */ + } + + /* "View.MemoryView":372 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":389 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf + */ + +static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + Py_ssize_t __pyx_v_dim; + char *__pyx_v_itemp; + PyObject *__pyx_v_idx = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + char *__pyx_t_7; + __Pyx_RefNannySetupContext("get_item_pointer", 0); + + /* "View.MemoryView":391 + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<< + * + * for dim, idx in enumerate(index): + */ + __pyx_v_itemp = ((char *)__pyx_v_self->view.buf); + + /* "View.MemoryView":393 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + */ + __pyx_t_1 = 0; + if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) { + __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 393, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 393, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 393, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_v_dim = __pyx_t_1; + __pyx_t_1 = (__pyx_t_1 + 1); + + /* "View.MemoryView":394 + * + * for dim, idx in enumerate(index): + * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<< + * + * return itemp + */ + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 394, __pyx_L1_error) + __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 394, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_7; + + /* "View.MemoryView":393 + * cdef char *itemp = self.view.buf + * + * for dim, idx in enumerate(index): # <<<<<<<<<<<<<< + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + */ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":396 + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + * return itemp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_itemp; + goto __pyx_L0; + + /* "View.MemoryView":389 + * PyThread_free_lock(self.lock) + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<< + * cdef Py_ssize_t dim + * cdef char *itemp = self.view.buf + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":399 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ +static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_indices = NULL; + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":400 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * + */ + __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":401 + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: + * return self # <<<<<<<<<<<<<< + * + * have_slices, indices = _unellipsify(index, self.view.ndim) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __pyx_r = ((PyObject *)__pyx_v_self); + goto __pyx_L0; + + /* "View.MemoryView":400 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * + */ + } + + /* "View.MemoryView":403 + * return self + * + * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * cdef char *itemp + */ + __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(__pyx_t_3 != Py_None)) { + PyObject* sequence = __pyx_t_3; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 403, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 403, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_indices = __pyx_t_5; + __pyx_t_5 = 0; + + /* "View.MemoryView":406 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 406, __pyx_L1_error) + if (__pyx_t_2) { + + /* "View.MemoryView":407 + * cdef char *itemp + * if have_slices: + * return memview_slice(self, indices) # <<<<<<<<<<<<<< + * else: + * itemp = self.get_item_pointer(indices) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":406 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: + */ + } + + /* "View.MemoryView":409 + * return memview_slice(self, indices) + * else: + * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<< + * return self.convert_item_to_object(itemp) + * + */ + /*else*/ { + __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_6; + + /* "View.MemoryView":410 + * else: + * itemp = self.get_item_pointer(indices) + * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<< + * + * def __setitem__(memoryview self, object index, object value): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":399 + * + * + * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<< + * if index is Ellipsis: + * return self + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_indices); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":412 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") + */ + +/* Python wrapper */ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + PyObject *__pyx_v_have_slices = NULL; + PyObject *__pyx_v_obj = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("__setitem__", 0); + __Pyx_INCREF(__pyx_v_index); + + /* "View.MemoryView":413 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError("Cannot assign to read-only memoryview") + * + */ + __pyx_t_1 = (__pyx_v_self->view.readonly != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":414 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 414, __pyx_L1_error) + + /* "View.MemoryView":413 + * + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: # <<<<<<<<<<<<<< + * raise TypeError("Cannot assign to read-only memoryview") + * + */ + } + + /* "View.MemoryView":416 + * raise TypeError("Cannot assign to read-only memoryview") + * + * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * if have_slices: + */ + __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(__pyx_t_2 != Py_None)) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 416, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 416, __pyx_L1_error) + } + __pyx_v_have_slices = __pyx_t_3; + __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":418 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 418, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":419 + * + * if have_slices: + * obj = self.is_slice(value) # <<<<<<<<<<<<<< + * if obj: + * self.setitem_slice_assignment(self[index], obj) + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_obj = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":420 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 420, __pyx_L1_error) + if (__pyx_t_1) { + + /* "View.MemoryView":421 + * obj = self.is_slice(value) + * if obj: + * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<< + * else: + * self.setitem_slice_assign_scalar(self[index], value) + */ + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "View.MemoryView":420 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":423 + * self.setitem_slice_assignment(self[index], obj) + * else: + * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<< + * else: + * self.setitem_indexed(index, value) + */ + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 423, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L5:; + + /* "View.MemoryView":418 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":425 + * self.setitem_slice_assign_scalar(self[index], value) + * else: + * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< + * + * cdef is_slice(self, obj): + */ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L4:; + + /* "View.MemoryView":412 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_have_slices); + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":427 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: + */ + +static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + __Pyx_RefNannySetupContext("is_slice", 0); + __Pyx_INCREF(__pyx_v_obj); + + /* "View.MemoryView":428 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + */ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + /*try:*/ { + + /* "View.MemoryView":430 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":431 + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) # <<<<<<<<<<<<<< + * except TypeError: + * return None + */ + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 431, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "View.MemoryView":430 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_obj); + __Pyx_GIVEREF(__pyx_v_obj); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 430, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7); + __pyx_t_7 = 0; + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L9_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "View.MemoryView":432 + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + * except TypeError: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); + if (__pyx_t_9) { + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 432, __pyx_L6_except_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":433 + * self.dtype_is_object) + * except TypeError: + * return None # <<<<<<<<<<<<<< + * + * return obj + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_except_return; + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "View.MemoryView":429 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L1_error; + __pyx_L7_except_return:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); + goto __pyx_L0; + __pyx_L9_try_end:; + } + + /* "View.MemoryView":428 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + */ + } + + /* "View.MemoryView":435 + * return None + * + * return obj # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assignment(self, dst, src): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_obj); + __pyx_r = __pyx_v_obj; + goto __pyx_L0; + + /* "View.MemoryView":427 + * self.setitem_indexed(index, value) + * + * cdef is_slice(self, obj): # <<<<<<<<<<<<<< + * if not isinstance(obj, memoryview): + * try: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":437 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + */ + +static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) { + __Pyx_memviewslice __pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_src_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); + + /* "View.MemoryView":441 + * cdef __Pyx_memviewslice src_slice + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) + */ + if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 441, __pyx_L1_error) + + /* "View.MemoryView":442 + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], + * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<< + * src.ndim, dst.ndim, self.dtype_is_object) + * + */ + if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 442, __pyx_L1_error) + + /* "View.MemoryView":443 + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":441 + * cdef __Pyx_memviewslice src_slice + * + * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<< + * get_slice_from_memview(dst, &dst_slice)[0], + * src.ndim, dst.ndim, self.dtype_is_object) + */ + __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 441, __pyx_L1_error) + + /* "View.MemoryView":437 + * return obj + * + * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice dst_slice + * cdef __Pyx_memviewslice src_slice + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":445 + * src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL + */ + +static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) { + int __pyx_v_array[0x80]; + void *__pyx_v_tmp; + void *__pyx_v_item; + __Pyx_memviewslice *__pyx_v_dst_slice; + __Pyx_memviewslice __pyx_v_tmp_slice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + char const *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); + + /* "View.MemoryView":447 + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): + * cdef int array[128] + * cdef void *tmp = NULL # <<<<<<<<<<<<<< + * cdef void *item + * + */ + __pyx_v_tmp = NULL; + + /* "View.MemoryView":452 + * cdef __Pyx_memviewslice *dst_slice + * cdef __Pyx_memviewslice tmp_slice + * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<< + * + * if self.view.itemsize > sizeof(array): + */ + __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); + + /* "View.MemoryView":454 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + */ + __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":455 + * + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<< + * if tmp == NULL: + * raise MemoryError + */ + __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize); + + /* "View.MemoryView":456 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp + */ + __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":457 + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * item = tmp + * else: + */ + PyErr_NoMemory(); __PYX_ERR(1, 457, __pyx_L1_error) + + /* "View.MemoryView":456 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp + */ + } + + /* "View.MemoryView":458 + * if tmp == NULL: + * raise MemoryError + * item = tmp # <<<<<<<<<<<<<< + * else: + * item = array + */ + __pyx_v_item = __pyx_v_tmp; + + /* "View.MemoryView":454 + * dst_slice = get_slice_from_memview(dst, &tmp_slice) + * + * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<< + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":460 + * item = tmp + * else: + * item = array # <<<<<<<<<<<<<< + * + * try: + */ + /*else*/ { + __pyx_v_item = ((void *)__pyx_v_array); + } + __pyx_L3:; + + /* "View.MemoryView":462 + * item = array + * + * try: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * ( item)[0] = value + */ + /*try:*/ { + + /* "View.MemoryView":463 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: + */ + __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":464 + * try: + * if self.dtype_is_object: + * ( item)[0] = value # <<<<<<<<<<<<<< + * else: + * self.assign_item_from_object( item, value) + */ + (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value); + + /* "View.MemoryView":463 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":466 + * ( item)[0] = value + * else: + * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L8:; + + /* "View.MemoryView":470 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + */ + __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":471 + * + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<< + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + * item, self.dtype_is_object) + */ + __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":470 + * + * + * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<< + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + */ + } + + /* "View.MemoryView":472 + * if self.view.suboffsets != NULL: + * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<< + * item, self.dtype_is_object) + * finally: + */ + __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object); + } + + /* "View.MemoryView":475 + * item, self.dtype_is_object) + * finally: + * PyMem_Free(tmp) # <<<<<<<<<<<<<< + * + * cdef setitem_indexed(self, index, value): + */ + /*finally:*/ { + /*normal exit:*/{ + PyMem_Free(__pyx_v_tmp); + goto __pyx_L7; + } + __pyx_L6_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename; + { + PyMem_Free(__pyx_v_tmp); + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + } + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8); + __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; + __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5; + goto __pyx_L1_error; + } + __pyx_L7:; + } + + /* "View.MemoryView":445 + * src.ndim, dst.ndim, self.dtype_is_object) + * + * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<< + * cdef int array[128] + * cdef void *tmp = NULL + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":477 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) + */ + +static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) { + char *__pyx_v_itemp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("setitem_indexed", 0); + + /* "View.MemoryView":478 + * + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<< + * self.assign_item_from_object(itemp, value) + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 478, __pyx_L1_error) + __pyx_v_itemp = __pyx_t_1; + + /* "View.MemoryView":479 + * cdef setitem_indexed(self, index, value): + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): + */ + __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":477 + * PyMem_Free(tmp) + * + * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<< + * cdef char *itemp = self.get_item_pointer(index) + * self.assign_item_from_object(itemp, value) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":481 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + +static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_v_struct = NULL; + PyObject *__pyx_v_bytesitem = 0; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":484 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef bytes bytesitem + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":487 + * cdef bytes bytesitem + * + * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<< + * try: + * result = struct.unpack(self.view.format, bytesitem) + */ + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); + /*try:*/ { + + /* "View.MemoryView":489 + * bytesitem = itemp[:self.view.itemsize] + * try: + * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<< + * except struct.error: + * raise ValueError("Unable to convert item to object") + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_7) { + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + } + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6); + __Pyx_INCREF(__pyx_v_bytesitem); + __Pyx_GIVEREF(__pyx_v_bytesitem); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem); + __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + } + + /* "View.MemoryView":493 + * raise ValueError("Unable to convert item to object") + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result + */ + /*else:*/ { + __pyx_t_10 = strlen(__pyx_v_self->view.format); + __pyx_t_11 = ((__pyx_t_10 == 1) != 0); + if (__pyx_t_11) { + + /* "View.MemoryView":494 + * else: + * if len(self.view.format) == 1: + * return result[0] # <<<<<<<<<<<<<< + * return result + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L6_except_return; + + /* "View.MemoryView":493 + * raise ValueError("Unable to convert item to object") + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result + */ + } + + /* "View.MemoryView":495 + * if len(self.view.format) == 1: + * return result[0] + * return result # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L6_except_return; + } + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":490 + * try: + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: # <<<<<<<<<<<<<< + * raise ValueError("Unable to convert item to object") + * else: + */ + __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 490, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9); + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0; + if (__pyx_t_8) { + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 490, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_1); + + /* "View.MemoryView":491 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(1, 491, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "View.MemoryView":488 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L1_error; + __pyx_L6_except_return:; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); + goto __pyx_L0; + } + + /* "View.MemoryView":481 + * self.assign_item_from_object(itemp, value) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesitem); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":497 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + +static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_v_struct = NULL; + char __pyx_v_c; + PyObject *__pyx_v_bytesvalue = 0; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + char *__pyx_t_11; + char *__pyx_t_12; + char *__pyx_t_13; + char *__pyx_t_14; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":500 + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + * import struct # <<<<<<<<<<<<<< + * cdef char c + * cdef bytes bytesvalue + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":505 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: + */ + __pyx_t_2 = PyTuple_Check(__pyx_v_value); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "View.MemoryView":506 + * + * if isinstance(value, tuple): + * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<< + * else: + * bytesvalue = struct.pack(self.view.format, value) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 506, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":505 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":508 + * bytesvalue = struct.pack(self.view.format, *value) + * else: + * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<< + * + * for i, c in enumerate(bytesvalue): + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 508, __pyx_L1_error) + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":510 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_9 = 0; + if (unlikely(__pyx_v_bytesvalue == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); + __PYX_ERR(1, 510, __pyx_L1_error) + } + __Pyx_INCREF(__pyx_v_bytesvalue); + __pyx_t_10 = __pyx_v_bytesvalue; + __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10); + __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10)); + for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) { + __pyx_t_11 = __pyx_t_14; + __pyx_v_c = (__pyx_t_11[0]); + + /* "View.MemoryView":511 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + __pyx_v_i = __pyx_t_9; + + /* "View.MemoryView":510 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_9 = (__pyx_t_9 + 1); + + /* "View.MemoryView":511 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "View.MemoryView":497 + * return result + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * """Only used if instantiated manually by the user, or if Cython doesn't + * know how to convert the type""" + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_struct); + __Pyx_XDECREF(__pyx_v_bytesvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":514 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") + */ + +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t *__pyx_t_4; + char *__pyx_t_5; + void *__pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + if (__pyx_v_info == NULL) { + PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); + return -1; + } + __Pyx_RefNannySetupContext("__getbuffer__", 0); + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + + /* "View.MemoryView":515 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + */ + __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_self->view.readonly != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":516 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 516, __pyx_L1_error) + + /* "View.MemoryView":515 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<< + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + */ + } + + /* "View.MemoryView":518 + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":519 + * + * if flags & PyBUF_ND: + * info.shape = self.view.shape # <<<<<<<<<<<<<< + * else: + * info.shape = NULL + */ + __pyx_t_4 = __pyx_v_self->view.shape; + __pyx_v_info->shape = __pyx_t_4; + + /* "View.MemoryView":518 + * raise ValueError("Cannot create writable memory view from read-only memoryview") + * + * if flags & PyBUF_ND: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":521 + * info.shape = self.view.shape + * else: + * info.shape = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: + */ + /*else*/ { + __pyx_v_info->shape = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":523 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":524 + * + * if flags & PyBUF_STRIDES: + * info.strides = self.view.strides # <<<<<<<<<<<<<< + * else: + * info.strides = NULL + */ + __pyx_t_4 = __pyx_v_self->view.strides; + __pyx_v_info->strides = __pyx_t_4; + + /* "View.MemoryView":523 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: + */ + goto __pyx_L7; + } + + /* "View.MemoryView":526 + * info.strides = self.view.strides + * else: + * info.strides = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_INDIRECT: + */ + /*else*/ { + __pyx_v_info->strides = NULL; + } + __pyx_L7:; + + /* "View.MemoryView":528 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":529 + * + * if flags & PyBUF_INDIRECT: + * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< + * else: + * info.suboffsets = NULL + */ + __pyx_t_4 = __pyx_v_self->view.suboffsets; + __pyx_v_info->suboffsets = __pyx_t_4; + + /* "View.MemoryView":528 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":531 + * info.suboffsets = self.view.suboffsets + * else: + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + /*else*/ { + __pyx_v_info->suboffsets = NULL; + } + __pyx_L8:; + + /* "View.MemoryView":533 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":534 + * + * if flags & PyBUF_FORMAT: + * info.format = self.view.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL + */ + __pyx_t_5 = __pyx_v_self->view.format; + __pyx_v_info->format = __pyx_t_5; + + /* "View.MemoryView":533 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: + */ + goto __pyx_L9; + } + + /* "View.MemoryView":536 + * info.format = self.view.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.buf = self.view.buf + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L9:; + + /* "View.MemoryView":538 + * info.format = NULL + * + * info.buf = self.view.buf # <<<<<<<<<<<<<< + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + */ + __pyx_t_6 = __pyx_v_self->view.buf; + __pyx_v_info->buf = __pyx_t_6; + + /* "View.MemoryView":539 + * + * info.buf = self.view.buf + * info.ndim = self.view.ndim # <<<<<<<<<<<<<< + * info.itemsize = self.view.itemsize + * info.len = self.view.len + */ + __pyx_t_7 = __pyx_v_self->view.ndim; + __pyx_v_info->ndim = __pyx_t_7; + + /* "View.MemoryView":540 + * info.buf = self.view.buf + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< + * info.len = self.view.len + * info.readonly = self.view.readonly + */ + __pyx_t_8 = __pyx_v_self->view.itemsize; + __pyx_v_info->itemsize = __pyx_t_8; + + /* "View.MemoryView":541 + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + * info.len = self.view.len # <<<<<<<<<<<<<< + * info.readonly = self.view.readonly + * info.obj = self + */ + __pyx_t_8 = __pyx_v_self->view.len; + __pyx_v_info->len = __pyx_t_8; + + /* "View.MemoryView":542 + * info.itemsize = self.view.itemsize + * info.len = self.view.len + * info.readonly = self.view.readonly # <<<<<<<<<<<<<< + * info.obj = self + * + */ + __pyx_t_1 = __pyx_v_self->view.readonly; + __pyx_v_info->readonly = __pyx_t_1; + + /* "View.MemoryView":543 + * info.len = self.view.len + * info.readonly = self.view.readonly + * info.obj = self # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); + + /* "View.MemoryView":514 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":549 + * + * @property + * def T(self): # <<<<<<<<<<<<<< + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":550 + * @property + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<< + * transpose_memslice(&result.from_slice) + * return result + */ + __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 550, __pyx_L1_error) + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":551 + * def T(self): + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 551, __pyx_L1_error) + + /* "View.MemoryView":552 + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + * return result # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":549 + * + * @property + * def T(self): # <<<<<<<<<<<<<< + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":555 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":556 + * @property + * def base(self): + * return self.obj # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->obj); + __pyx_r = __pyx_v_self->obj; + goto __pyx_L0; + + /* "View.MemoryView":555 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":559 + * + * @property + * def shape(self): # <<<<<<<<<<<<<< + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_length; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":560 + * @property + * def shape(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) { + __pyx_t_2 = __pyx_t_4; + __pyx_v_length = (__pyx_t_2[0]); + __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":559 + * + * @property + * def shape(self): # <<<<<<<<<<<<<< + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":563 + * + * @property + * def strides(self): # <<<<<<<<<<<<<< + * if self.view.strides == NULL: + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_stride; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":564 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError("Buffer view does not expose strides") + */ + __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":566 + * if self.view.strides == NULL: + * + * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 566, __pyx_L1_error) + + /* "View.MemoryView":564 + * @property + * def strides(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError("Buffer view does not expose strides") + */ + } + + /* "View.MemoryView":568 + * raise ValueError("Buffer view does not expose strides") + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_v_stride = (__pyx_t_3[0]); + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "View.MemoryView":563 + * + * @property + * def strides(self): # <<<<<<<<<<<<<< + * if self.view.strides == NULL: + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":571 + * + * @property + * def suboffsets(self): # <<<<<<<<<<<<<< + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + Py_ssize_t *__pyx_t_6; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":572 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * + */ + __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":573 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__156, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":572 + * @property + * def suboffsets(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * + */ + } + + /* "View.MemoryView":575 + * return (-1,) * self.view.ndim + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim); + for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) { + __pyx_t_4 = __pyx_t_6; + __pyx_v_suboffset = (__pyx_t_4[0]); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":571 + * + * @property + * def suboffsets(self): # <<<<<<<<<<<<<< + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":578 + * + * @property + * def ndim(self): # <<<<<<<<<<<<<< + * return self.view.ndim + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":579 + * @property + * def ndim(self): + * return self.view.ndim # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":578 + * + * @property + * def ndim(self): # <<<<<<<<<<<<<< + * return self.view.ndim + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":582 + * + * @property + * def itemsize(self): # <<<<<<<<<<<<<< + * return self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":583 + * @property + * def itemsize(self): + * return self.view.itemsize # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":582 + * + * @property + * def itemsize(self): # <<<<<<<<<<<<<< + * return self.view.itemsize + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":586 + * + * @property + * def nbytes(self): # <<<<<<<<<<<<<< + * return self.size * self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":587 + * @property + * def nbytes(self): + * return self.size * self.view.itemsize # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":586 + * + * @property + * def nbytes(self): # <<<<<<<<<<<<<< + * return self.size * self.view.itemsize + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":590 + * + * @property + * def size(self): # <<<<<<<<<<<<<< + * if self._size is None: + * result = 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t *__pyx_t_3; + Py_ssize_t *__pyx_t_4; + Py_ssize_t *__pyx_t_5; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":591 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * + */ + __pyx_t_1 = (__pyx_v_self->_size == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":592 + * def size(self): + * if self._size is None: + * result = 1 # <<<<<<<<<<<<<< + * + * for length in self.view.shape[:self.view.ndim]: + */ + __Pyx_INCREF(__pyx_int_1); + __pyx_v_result = __pyx_int_1; + + /* "View.MemoryView":594 + * result = 1 + * + * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<< + * result *= length + * + */ + __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim); + for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) { + __pyx_t_3 = __pyx_t_5; + __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6); + __pyx_t_6 = 0; + + /* "View.MemoryView":595 + * + * for length in self.view.shape[:self.view.ndim]: + * result *= length # <<<<<<<<<<<<<< + * + * self._size = result + */ + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); + __pyx_t_6 = 0; + } + + /* "View.MemoryView":597 + * result *= length + * + * self._size = result # <<<<<<<<<<<<<< + * + * return self._size + */ + __Pyx_INCREF(__pyx_v_result); + __Pyx_GIVEREF(__pyx_v_result); + __Pyx_GOTREF(__pyx_v_self->_size); + __Pyx_DECREF(__pyx_v_self->_size); + __pyx_v_self->_size = __pyx_v_result; + + /* "View.MemoryView":591 + * @property + * def size(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * + */ + } + + /* "View.MemoryView":599 + * self._size = result + * + * return self._size # <<<<<<<<<<<<<< + * + * def __len__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_size); + __pyx_r = __pyx_v_self->_size; + goto __pyx_L0; + + /* "View.MemoryView":590 + * + * @property + * def size(self): # <<<<<<<<<<<<<< + * if self._size is None: + * result = 1 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":601 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] + */ + +/* Python wrapper */ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__len__", 0); + + /* "View.MemoryView":602 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * + */ + __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":603 + * def __len__(self): + * if self.view.ndim >= 1: + * return self.view.shape[0] # <<<<<<<<<<<<<< + * + * return 0 + */ + __pyx_r = (__pyx_v_self->view.shape[0]); + goto __pyx_L0; + + /* "View.MemoryView":602 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * + */ + } + + /* "View.MemoryView":605 + * return self.view.shape[0] + * + * return 0 # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":601 + * return self._size + * + * def __len__(self): # <<<<<<<<<<<<<< + * if self.view.ndim >= 1: + * return self.view.shape[0] + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":607 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":608 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":609 + * def __repr__(self): + * return "" % (self.base.__class__.__name__, + * id(self)) # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "View.MemoryView":608 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":607 + * return 0 + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__, + * id(self)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":611 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "View.MemoryView":612 + * + * def __str__(self): + * return "" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":611 + * id(self)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return "" % (self.base.__class__.__name__,) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":615 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("is_c_contig", 0); + + /* "View.MemoryView":618 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":619 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<< + * + * def is_f_contig(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":615 + * + * + * def is_c_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":621 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice *__pyx_v_mslice; + __Pyx_memviewslice __pyx_v_tmp; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("is_f_contig", 0); + + /* "View.MemoryView":624 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":625 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<< + * + * def copy(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":621 + * return slice_is_contig(mslice[0], 'C', self.view.ndim) + * + * def is_f_contig(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":627 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_mslice; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("copy", 0); + + /* "View.MemoryView":629 + * def copy(self): + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &mslice) + */ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS)); + + /* "View.MemoryView":631 + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + * + * slice_copy(self, &mslice) # <<<<<<<<<<<<<< + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, + * self.view.itemsize, + */ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice)); + + /* "View.MemoryView":632 + * + * slice_copy(self, &mslice) + * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_C_CONTIGUOUS, + */ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 632, __pyx_L1_error) + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":637 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<< + * + * def copy_fortran(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":627 + * return slice_is_contig(mslice[0], 'F', self.view.ndim) + * + * def copy(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice mslice + * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":639 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0); + __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) { + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + int __pyx_v_flags; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_memviewslice __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("copy_fortran", 0); + + /* "View.MemoryView":641 + * def copy_fortran(self): + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<< + * + * slice_copy(self, &src) + */ + __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS)); + + /* "View.MemoryView":643 + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + * + * slice_copy(self, &src) # <<<<<<<<<<<<<< + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, + * self.view.itemsize, + */ + __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src)); + + /* "View.MemoryView":644 + * + * slice_copy(self, &src) + * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<< + * self.view.itemsize, + * flags|PyBUF_F_CONTIGUOUS, + */ + __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 644, __pyx_L1_error) + __pyx_v_dst = __pyx_t_1; + + /* "View.MemoryView":649 + * self.dtype_is_object) + * + * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":639 + * return memoryview_copy_from_slice(self, &mslice) + * + * def copy_fortran(self): # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice src, dst + * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":653 + * + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + */ + +static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) { + struct __pyx_memoryview_obj *__pyx_v_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); + + /* "View.MemoryView":654 + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<< + * result.typeinfo = typeinfo + * return result + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_o); + __Pyx_GIVEREF(__pyx_v_o); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":655 + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_v_result->typeinfo = __pyx_v_typeinfo; + + /* "View.MemoryView":656 + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_check') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":653 + * + * @cname('__pyx_memoryview_new') + * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<< + * cdef memoryview result = memoryview(o, flags, dtype_is_object) + * result.typeinfo = typeinfo + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":659 + * + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< + * return isinstance(o, memoryview) + * + */ + +static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("memoryview_check", 0); + + /* "View.MemoryView":660 + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): + * return isinstance(o, memoryview) # <<<<<<<<<<<<<< + * + * cdef tuple _unellipsify(object index, int ndim): + */ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "View.MemoryView":659 + * + * @cname('__pyx_memoryview_check') + * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<< + * return isinstance(o, memoryview) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":662 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with + */ + +static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { + PyObject *__pyx_v_tup = NULL; + PyObject *__pyx_v_result = NULL; + int __pyx_v_have_slices; + int __pyx_v_seen_ellipsis; + CYTHON_UNUSED PyObject *__pyx_v_idx = NULL; + PyObject *__pyx_v_item = NULL; + Py_ssize_t __pyx_v_nslices; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + __Pyx_RefNannySetupContext("_unellipsify", 0); + + /* "View.MemoryView":667 + * full slices. + * """ + * if not isinstance(index, tuple): # <<<<<<<<<<<<<< + * tup = (index,) + * else: + */ + __pyx_t_1 = PyTuple_Check(__pyx_v_index); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":668 + * """ + * if not isinstance(index, tuple): + * tup = (index,) # <<<<<<<<<<<<<< + * else: + * tup = index + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_index); + __Pyx_GIVEREF(__pyx_v_index); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index); + __pyx_v_tup = __pyx_t_3; + __pyx_t_3 = 0; + + /* "View.MemoryView":667 + * full slices. + * """ + * if not isinstance(index, tuple): # <<<<<<<<<<<<<< + * tup = (index,) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":670 + * tup = (index,) + * else: + * tup = index # <<<<<<<<<<<<<< + * + * result = [] + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_index); + __pyx_v_tup = __pyx_v_index; + } + __pyx_L3:; + + /* "View.MemoryView":672 + * tup = index + * + * result = [] # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_result = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":673 + * + * result = [] + * have_slices = False # <<<<<<<<<<<<<< + * seen_ellipsis = False + * for idx, item in enumerate(tup): + */ + __pyx_v_have_slices = 0; + + /* "View.MemoryView":674 + * result = [] + * have_slices = False + * seen_ellipsis = False # <<<<<<<<<<<<<< + * for idx, item in enumerate(tup): + * if item is Ellipsis: + */ + __pyx_v_seen_ellipsis = 0; + + /* "View.MemoryView":675 + * have_slices = False + * seen_ellipsis = False + * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_t_3 = __pyx_int_0; + if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) { + __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 675, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 675, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + } + } else { + __pyx_t_7 = __pyx_t_6(__pyx_t_4); + if (unlikely(!__pyx_t_7)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 675, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_INCREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); + __pyx_t_3 = __pyx_t_7; + __pyx_t_7 = 0; + + /* "View.MemoryView":676 + * seen_ellipsis = False + * for idx, item in enumerate(tup): + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + */ + __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":677 + * for idx, item in enumerate(tup): + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True + */ + __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":678 + * if item is Ellipsis: + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * else: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 678, __pyx_L1_error) + __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) { + __Pyx_INCREF(__pyx_slice__159); + __Pyx_GIVEREF(__pyx_slice__159); + PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__159); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "View.MemoryView":679 + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True # <<<<<<<<<<<<<< + * else: + * result.append(slice(None)) + */ + __pyx_v_seen_ellipsis = 1; + + /* "View.MemoryView":677 + * for idx, item in enumerate(tup): + * if item is Ellipsis: + * if not seen_ellipsis: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + * seen_ellipsis = True + */ + goto __pyx_L7; + } + + /* "View.MemoryView":681 + * seen_ellipsis = True + * else: + * result.append(slice(None)) # <<<<<<<<<<<<<< + * have_slices = True + * else: + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__159); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":682 + * else: + * result.append(slice(None)) + * have_slices = True # <<<<<<<<<<<<<< + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): + */ + __pyx_v_have_slices = 1; + + /* "View.MemoryView":676 + * seen_ellipsis = False + * for idx, item in enumerate(tup): + * if item is Ellipsis: # <<<<<<<<<<<<<< + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) + */ + goto __pyx_L6; + } + + /* "View.MemoryView":684 + * have_slices = True + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + */ + /*else*/ { + __pyx_t_2 = PySlice_Check(__pyx_v_item); + __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0); + __pyx_t_1 = __pyx_t_10; + __pyx_L9_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":685 + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): + * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<< + * + * have_slices = have_slices or isinstance(item, slice) + */ + __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_11, 0, 0, 0); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __PYX_ERR(1, 685, __pyx_L1_error) + + /* "View.MemoryView":684 + * have_slices = True + * else: + * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<< + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + */ + } + + /* "View.MemoryView":687 + * raise TypeError("Cannot index with type '%s'" % type(item)) + * + * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<< + * result.append(item) + * + */ + __pyx_t_10 = (__pyx_v_have_slices != 0); + if (!__pyx_t_10) { + } else { + __pyx_t_1 = __pyx_t_10; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_10 = PySlice_Check(__pyx_v_item); + __pyx_t_2 = (__pyx_t_10 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __pyx_v_have_slices = __pyx_t_1; + + /* "View.MemoryView":688 + * + * have_slices = have_slices or isinstance(item, slice) + * result.append(item) # <<<<<<<<<<<<<< + * + * nslices = ndim - len(result) + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error) + } + __pyx_L6:; + + /* "View.MemoryView":675 + * have_slices = False + * seen_ellipsis = False + * for idx, item in enumerate(tup): # <<<<<<<<<<<<<< + * if item is Ellipsis: + * if not seen_ellipsis: + */ + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":690 + * result.append(item) + * + * nslices = ndim - len(result) # <<<<<<<<<<<<<< + * if nslices: + * result.extend([slice(None)] * nslices) + */ + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 690, __pyx_L1_error) + __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5); + + /* "View.MemoryView":691 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + __pyx_t_1 = (__pyx_v_nslices != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":692 + * nslices = ndim - len(result) + * if nslices: + * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<< + * + * return have_slices or nslices, tuple(result) + */ + __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) { + __Pyx_INCREF(__pyx_slice__159); + __Pyx_GIVEREF(__pyx_slice__159); + PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__159); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":691 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + } + + /* "View.MemoryView":694 + * result.extend([slice(None)] * nslices) + * + * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<< + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + */ + __Pyx_XDECREF(__pyx_r); + if (!__pyx_v_have_slices) { + } else { + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_L14_bool_binop_done:; + __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = ((PyObject*)__pyx_t_11); + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "View.MemoryView":662 + * return isinstance(o, memoryview) + * + * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<< + * """ + * Replace all ellipses with full slices and fill incomplete indices with + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_tup); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":696 + * return have_slices or nslices, tuple(result) + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + */ + +static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) { + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t *__pyx_t_1; + Py_ssize_t *__pyx_t_2; + Py_ssize_t *__pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("assert_direct_dimensions", 0); + + /* "View.MemoryView":697 + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") + */ + __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim); + for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) { + __pyx_t_1 = __pyx_t_3; + __pyx_v_suboffset = (__pyx_t_1[0]); + + /* "View.MemoryView":698 + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError("Indirect dimensions not supported") + * + */ + __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0); + if (unlikely(__pyx_t_4)) { + + /* "View.MemoryView":699 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 699, __pyx_L1_error) + + /* "View.MemoryView":698 + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * raise ValueError("Indirect dimensions not supported") + * + */ + } + } + + /* "View.MemoryView":696 + * return have_slices or nslices, tuple(result) + * + * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<< + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":706 + * + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< + * cdef int new_ndim = 0, suboffset_dim = -1, dim + * cdef bint negative_step + */ + +static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) { + int __pyx_v_new_ndim; + int __pyx_v_suboffset_dim; + int __pyx_v_dim; + __Pyx_memviewslice __pyx_v_src; + __Pyx_memviewslice __pyx_v_dst; + __Pyx_memviewslice *__pyx_v_p_src; + struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0; + __Pyx_memviewslice *__pyx_v_p_dst; + int *__pyx_v_p_suboffset_dim; + Py_ssize_t __pyx_v_start; + Py_ssize_t __pyx_v_stop; + Py_ssize_t __pyx_v_step; + int __pyx_v_have_start; + int __pyx_v_have_stop; + int __pyx_v_have_step; + PyObject *__pyx_v_index = NULL; + struct __pyx_memoryview_obj *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + struct __pyx_memoryview_obj *__pyx_t_4; + char *__pyx_t_5; + int __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + __Pyx_RefNannySetupContext("memview_slice", 0); + + /* "View.MemoryView":707 + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): + * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<< + * cdef bint negative_step + * cdef __Pyx_memviewslice src, dst + */ + __pyx_v_new_ndim = 0; + __pyx_v_suboffset_dim = -1; + + /* "View.MemoryView":714 + * + * + * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< + * + * cdef _memoryviewslice memviewsliceobj + */ + (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)))); + + /* "View.MemoryView":718 + * cdef _memoryviewslice memviewsliceobj + * + * assert memview.view.ndim > 0 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): + */ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) { + PyErr_SetNone(PyExc_AssertionError); + __PYX_ERR(1, 718, __pyx_L1_error) + } + } + #endif + + /* "View.MemoryView":720 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":721 + * + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview # <<<<<<<<<<<<<< + * p_src = &memviewsliceobj.from_slice + * else: + */ + if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 721, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":722 + * if isinstance(memview, _memoryviewslice): + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, &src) + */ + __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice); + + /* "View.MemoryView":720 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice + */ + goto __pyx_L3; + } + + /* "View.MemoryView":724 + * p_src = &memviewsliceobj.from_slice + * else: + * slice_copy(memview, &src) # <<<<<<<<<<<<<< + * p_src = &src + * + */ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src)); + + /* "View.MemoryView":725 + * else: + * slice_copy(memview, &src) + * p_src = &src # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_p_src = (&__pyx_v_src); + } + __pyx_L3:; + + /* "View.MemoryView":731 + * + * + * dst.memview = p_src.memview # <<<<<<<<<<<<<< + * dst.data = p_src.data + * + */ + __pyx_t_4 = __pyx_v_p_src->memview; + __pyx_v_dst.memview = __pyx_t_4; + + /* "View.MemoryView":732 + * + * dst.memview = p_src.memview + * dst.data = p_src.data # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __pyx_v_p_src->data; + __pyx_v_dst.data = __pyx_t_5; + + /* "View.MemoryView":737 + * + * + * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<< + * cdef int *p_suboffset_dim = &suboffset_dim + * cdef Py_ssize_t start, stop, step + */ + __pyx_v_p_dst = (&__pyx_v_dst); + + /* "View.MemoryView":738 + * + * cdef __Pyx_memviewslice *p_dst = &dst + * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<< + * cdef Py_ssize_t start, stop, step + * cdef bint have_start, have_stop, have_step + */ + __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim); + + /* "View.MemoryView":742 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * slice_memviewslice( + */ + __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) { + __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 742, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error) + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 742, __pyx_L1_error) + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + #endif + } + } else { + __pyx_t_9 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_9)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(1, 742, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_9); + } + __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_v_dim = __pyx_t_6; + __pyx_t_6 = (__pyx_t_6 + 1); + + /* "View.MemoryView":743 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + */ + __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":747 + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<< + * 0, 0, 0, # have_{start,stop,step} + * False) + */ + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 747, __pyx_L1_error) + + /* "View.MemoryView":744 + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + */ + __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 744, __pyx_L1_error) + + /* "View.MemoryView":743 + * + * for dim, index in enumerate(indices): + * if PyIndex_Check(index): # <<<<<<<<<<<<<< + * slice_memviewslice( + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + */ + goto __pyx_L6; + } + + /* "View.MemoryView":750 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + */ + __pyx_t_2 = (__pyx_v_index == Py_None); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":751 + * False) + * elif index is None: + * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<< + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + */ + (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1; + + /* "View.MemoryView":752 + * elif index is None: + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<< + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 + */ + (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0; + + /* "View.MemoryView":753 + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<< + * new_ndim += 1 + * else: + */ + (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L; + + /* "View.MemoryView":754 + * p_dst.strides[new_ndim] = 0 + * p_dst.suboffsets[new_ndim] = -1 + * new_ndim += 1 # <<<<<<<<<<<<<< + * else: + * start = index.start or 0 + */ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + + /* "View.MemoryView":750 + * 0, 0, 0, # have_{start,stop,step} + * False) + * elif index is None: # <<<<<<<<<<<<<< + * p_dst.shape[new_ndim] = 1 + * p_dst.strides[new_ndim] = 0 + */ + goto __pyx_L6; + } + + /* "View.MemoryView":756 + * new_ndim += 1 + * else: + * start = index.start or 0 # <<<<<<<<<<<<<< + * stop = index.stop or 0 + * step = index.step or 0 + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 756, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 756, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L7_bool_binop_done:; + __pyx_v_start = __pyx_t_10; + + /* "View.MemoryView":757 + * else: + * start = index.start or 0 + * stop = index.stop or 0 # <<<<<<<<<<<<<< + * step = index.step or 0 + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 757, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 757, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L9_bool_binop_done:; + __pyx_v_stop = __pyx_t_10; + + /* "View.MemoryView":758 + * start = index.start or 0 + * stop = index.stop or 0 + * step = index.step or 0 # <<<<<<<<<<<<<< + * + * have_start = index.start is not None + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 758, __pyx_L1_error) + if (!__pyx_t_1) { + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 758, __pyx_L1_error) + __pyx_t_10 = __pyx_t_12; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_10 = 0; + __pyx_L11_bool_binop_done:; + __pyx_v_step = __pyx_t_10; + + /* "View.MemoryView":760 + * step = index.step or 0 + * + * have_start = index.start is not None # <<<<<<<<<<<<<< + * have_stop = index.stop is not None + * have_step = index.step is not None + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_start = __pyx_t_1; + + /* "View.MemoryView":761 + * + * have_start = index.start is not None + * have_stop = index.stop is not None # <<<<<<<<<<<<<< + * have_step = index.step is not None + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_stop = __pyx_t_1; + + /* "View.MemoryView":762 + * have_start = index.start is not None + * have_stop = index.stop is not None + * have_step = index.step is not None # <<<<<<<<<<<<<< + * + * slice_memviewslice( + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = (__pyx_t_9 != Py_None); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_have_step = __pyx_t_1; + + /* "View.MemoryView":764 + * have_step = index.step is not None + * + * slice_memviewslice( # <<<<<<<<<<<<<< + * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + * dim, new_ndim, p_suboffset_dim, + */ + __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 764, __pyx_L1_error) + + /* "View.MemoryView":770 + * have_start, have_stop, have_step, + * True) + * new_ndim += 1 # <<<<<<<<<<<<<< + * + * if isinstance(memview, _memoryviewslice): + */ + __pyx_v_new_ndim = (__pyx_v_new_ndim + 1); + } + __pyx_L6:; + + /* "View.MemoryView":742 + * cdef bint have_start, have_stop, have_step + * + * for dim, index in enumerate(indices): # <<<<<<<<<<<<<< + * if PyIndex_Check(index): + * slice_memviewslice( + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":772 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":773 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "View.MemoryView":774 + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<< + * memviewsliceobj.to_dtype_func, + * memview.dtype_is_object) + */ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 774, __pyx_L1_error) } + + /* "View.MemoryView":775 + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * else: + */ + if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 775, __pyx_L1_error) } + + /* "View.MemoryView":773 + * + * if isinstance(memview, _memoryviewslice): + * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<< + * memviewsliceobj.to_object_func, + * memviewsliceobj.to_dtype_func, + */ + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 773, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":772 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + */ + } + + /* "View.MemoryView":778 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * + */ + /*else*/ { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "View.MemoryView":779 + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + + /* "View.MemoryView":778 + * memview.dtype_is_object) + * else: + * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<< + * memview.dtype_is_object) + * + */ + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 778, __pyx_L1_error) + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":706 + * + * @cname('__pyx_memview_slice') + * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<< + * cdef int new_ndim = 0, suboffset_dim = -1, dim + * cdef bint negative_step + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj); + __Pyx_XDECREF(__pyx_v_index); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":803 + * + * @cname('__pyx_memoryview_slice_memviewslice') + * cdef int slice_memviewslice( # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, + */ + +static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) { + Py_ssize_t __pyx_v_new_shape; + int __pyx_v_negative_step; + int __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":823 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: + */ + __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":825 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: + */ + __pyx_t_1 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":826 + * + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if not 0 <= start < shape: + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + */ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":825 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: + */ + } + + /* "View.MemoryView":827 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + * else: + */ + __pyx_t_1 = (0 <= __pyx_v_start); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_start < __pyx_v_shape); + } + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":828 + * start += shape + * if not 0 <= start < shape: + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 828, __pyx_L1_error) + + /* "View.MemoryView":827 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + * else: + */ + } + + /* "View.MemoryView":823 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":831 + * else: + * + * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<< + * + * if have_step and step == 0: + */ + /*else*/ { + __pyx_t_1 = ((__pyx_v_have_step != 0) != 0); + if (__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_1 = ((__pyx_v_step < 0) != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L6_bool_binop_done:; + __pyx_v_negative_step = __pyx_t_2; + + /* "View.MemoryView":833 + * negative_step = have_step != 0 and step < 0 + * + * if have_step and step == 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) + * + */ + __pyx_t_1 = (__pyx_v_have_step != 0); + if (__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_1 = ((__pyx_v_step == 0) != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L9_bool_binop_done:; + if (__pyx_t_2) { + + /* "View.MemoryView":834 + * + * if have_step and step == 0: + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error) + + /* "View.MemoryView":833 + * negative_step = have_step != 0 and step < 0 + * + * if have_step and step == 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) + * + */ + } + + /* "View.MemoryView":837 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + __pyx_t_2 = (__pyx_v_have_start != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":838 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: + */ + __pyx_t_2 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":839 + * if have_start: + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if start < 0: + * start = 0 + */ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":840 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: + */ + __pyx_t_2 = ((__pyx_v_start < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":841 + * start += shape + * if start < 0: + * start = 0 # <<<<<<<<<<<<<< + * elif start >= shape: + * if negative_step: + */ + __pyx_v_start = 0; + + /* "View.MemoryView":840 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: + */ + } + + /* "View.MemoryView":838 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: + */ + goto __pyx_L12; + } + + /* "View.MemoryView":842 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 + */ + __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":843 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":844 + * elif start >= shape: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = shape + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":843 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L14; + } + + /* "View.MemoryView":846 + * start = shape - 1 + * else: + * start = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + /*else*/ { + __pyx_v_start = __pyx_v_shape; + } + __pyx_L14:; + + /* "View.MemoryView":842 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 + */ + } + __pyx_L12:; + + /* "View.MemoryView":837 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + goto __pyx_L11; + } + + /* "View.MemoryView":848 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":849 + * else: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = 0 + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":848 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L15; + } + + /* "View.MemoryView":851 + * start = shape - 1 + * else: + * start = 0 # <<<<<<<<<<<<<< + * + * if have_stop: + */ + /*else*/ { + __pyx_v_start = 0; + } + __pyx_L15:; + } + __pyx_L11:; + + /* "View.MemoryView":853 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + __pyx_t_2 = (__pyx_v_have_stop != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":854 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: + */ + __pyx_t_2 = ((__pyx_v_stop < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":855 + * if have_stop: + * if stop < 0: + * stop += shape # <<<<<<<<<<<<<< + * if stop < 0: + * stop = 0 + */ + __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); + + /* "View.MemoryView":856 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: + */ + __pyx_t_2 = ((__pyx_v_stop < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":857 + * stop += shape + * if stop < 0: + * stop = 0 # <<<<<<<<<<<<<< + * elif stop > shape: + * stop = shape + */ + __pyx_v_stop = 0; + + /* "View.MemoryView":856 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: + */ + } + + /* "View.MemoryView":854 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: + */ + goto __pyx_L17; + } + + /* "View.MemoryView":858 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: + */ + __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":859 + * stop = 0 + * elif stop > shape: + * stop = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + __pyx_v_stop = __pyx_v_shape; + + /* "View.MemoryView":858 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: + */ + } + __pyx_L17:; + + /* "View.MemoryView":853 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + goto __pyx_L16; + } + + /* "View.MemoryView":861 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":862 + * else: + * if negative_step: + * stop = -1 # <<<<<<<<<<<<<< + * else: + * stop = shape + */ + __pyx_v_stop = -1L; + + /* "View.MemoryView":861 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + goto __pyx_L19; + } + + /* "View.MemoryView":864 + * stop = -1 + * else: + * stop = shape # <<<<<<<<<<<<<< + * + * if not have_step: + */ + /*else*/ { + __pyx_v_stop = __pyx_v_shape; + } + __pyx_L19:; + } + __pyx_L16:; + + /* "View.MemoryView":866 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":867 + * + * if not have_step: + * step = 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_step = 1; + + /* "View.MemoryView":866 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + } + + /* "View.MemoryView":871 + * + * with cython.cdivision(True): + * new_shape = (stop - start) // step # <<<<<<<<<<<<<< + * + * if (stop - start) - step * new_shape: + */ + __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step); + + /* "View.MemoryView":873 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * + */ + __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":874 + * + * if (stop - start) - step * new_shape: + * new_shape += 1 # <<<<<<<<<<<<<< + * + * if new_shape < 0: + */ + __pyx_v_new_shape = (__pyx_v_new_shape + 1); + + /* "View.MemoryView":873 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * + */ + } + + /* "View.MemoryView":876 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * + */ + __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":877 + * + * if new_shape < 0: + * new_shape = 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_new_shape = 0; + + /* "View.MemoryView":876 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * + */ + } + + /* "View.MemoryView":880 + * + * + * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<< + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset + */ + (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step); + + /* "View.MemoryView":881 + * + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<< + * dst.suboffsets[new_ndim] = suboffset + * + */ + (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape; + + /* "View.MemoryView":882 + * dst.strides[new_ndim] = stride * step + * dst.shape[new_ndim] = new_shape + * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset; + } + __pyx_L3:; + + /* "View.MemoryView":885 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: + */ + __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":886 + * + * if suboffset_dim[0] < 0: + * dst.data += start * stride # <<<<<<<<<<<<<< + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride + */ + __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride)); + + /* "View.MemoryView":885 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: + */ + goto __pyx_L23; + } + + /* "View.MemoryView":888 + * dst.data += start * stride + * else: + * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<< + * + * if suboffset >= 0: + */ + /*else*/ { + __pyx_t_3 = (__pyx_v_suboffset_dim[0]); + (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride)); + } + __pyx_L23:; + + /* "View.MemoryView":890 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: + */ + __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":891 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset + */ + __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":892 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: + */ + __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":893 + * if not is_slice: + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset # <<<<<<<<<<<<<< + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " + */ + __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":892 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: + */ + goto __pyx_L26; + } + + /* "View.MemoryView":895 + * dst.data = ( dst.data)[0] + suboffset + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<< + * "must be indexed and not sliced", dim) + * else: + */ + /*else*/ { + + /* "View.MemoryView":896 + * else: + * _err_dim(IndexError, "All dimensions preceding dimension %d " + * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<< + * else: + * suboffset_dim[0] = new_ndim + */ + __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 895, __pyx_L1_error) + } + __pyx_L26:; + + /* "View.MemoryView":891 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset + */ + goto __pyx_L25; + } + + /* "View.MemoryView":898 + * "must be indexed and not sliced", dim) + * else: + * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<< + * + * return 0 + */ + /*else*/ { + (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim; + } + __pyx_L25:; + + /* "View.MemoryView":890 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: + */ + } + + /* "View.MemoryView":900 + * suboffset_dim[0] = new_ndim + * + * return 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":803 + * + * @cname('__pyx_memoryview_slice_memviewslice') + * cdef int slice_memviewslice( # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":906 + * + * @cname('__pyx_pybuffer_index') + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + */ + +static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) { + Py_ssize_t __pyx_v_shape; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_suboffset; + Py_ssize_t __pyx_v_itemsize; + char *__pyx_v_resultp; + char *__pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("pybuffer_index", 0); + + /* "View.MemoryView":908 + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<< + * cdef Py_ssize_t itemsize = view.itemsize + * cdef char *resultp + */ + __pyx_v_suboffset = -1L; + + /* "View.MemoryView":909 + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<< + * cdef char *resultp + * + */ + __pyx_t_1 = __pyx_v_view->itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":912 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len / itemsize + * stride = itemsize + */ + __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":913 + * + * if view.ndim == 0: + * shape = view.len / itemsize # <<<<<<<<<<<<<< + * stride = itemsize + * else: + */ + if (unlikely(__pyx_v_itemsize == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); + __PYX_ERR(1, 913, __pyx_L1_error) + } + else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) { + PyErr_SetString(PyExc_OverflowError, "value too large to perform division"); + __PYX_ERR(1, 913, __pyx_L1_error) + } + __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); + + /* "View.MemoryView":914 + * if view.ndim == 0: + * shape = view.len / itemsize + * stride = itemsize # <<<<<<<<<<<<<< + * else: + * shape = view.shape[dim] + */ + __pyx_v_stride = __pyx_v_itemsize; + + /* "View.MemoryView":912 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len / itemsize + * stride = itemsize + */ + goto __pyx_L3; + } + + /* "View.MemoryView":916 + * stride = itemsize + * else: + * shape = view.shape[dim] # <<<<<<<<<<<<<< + * stride = view.strides[dim] + * if view.suboffsets != NULL: + */ + /*else*/ { + __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]); + + /* "View.MemoryView":917 + * else: + * shape = view.shape[dim] + * stride = view.strides[dim] # <<<<<<<<<<<<<< + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] + */ + __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]); + + /* "View.MemoryView":918 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * + */ + __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":919 + * stride = view.strides[dim] + * if view.suboffsets != NULL: + * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<< + * + * if index < 0: + */ + __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]); + + /* "View.MemoryView":918 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * + */ + } + } + __pyx_L3:; + + /* "View.MemoryView":921 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: + */ + __pyx_t_2 = ((__pyx_v_index < 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":922 + * + * if index < 0: + * index += view.shape[dim] # <<<<<<<<<<<<<< + * if index < 0: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + */ + __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim])); + + /* "View.MemoryView":923 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + __pyx_t_2 = ((__pyx_v_index < 0) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":924 + * index += view.shape[dim] + * if index < 0: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< + * + * if index >= shape: + */ + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 924, __pyx_L1_error) + + /* "View.MemoryView":923 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + } + + /* "View.MemoryView":921 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: + */ + } + + /* "View.MemoryView":926 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0); + if (unlikely(__pyx_t_2)) { + + /* "View.MemoryView":927 + * + * if index >= shape: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< + * + * resultp = bufp + index * stride + */ + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 927, __pyx_L1_error) + + /* "View.MemoryView":926 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * if index >= shape: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + } + + /* "View.MemoryView":929 + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + * resultp = bufp + index * stride # <<<<<<<<<<<<<< + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset + */ + __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride)); + + /* "View.MemoryView":930 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * + */ + __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":931 + * resultp = bufp + index * stride + * if suboffset >= 0: + * resultp = ( resultp)[0] + suboffset # <<<<<<<<<<<<<< + * + * return resultp + */ + __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset); + + /* "View.MemoryView":930 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * + */ + } + + /* "View.MemoryView":933 + * resultp = ( resultp)[0] + suboffset + * + * return resultp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_resultp; + goto __pyx_L0; + + /* "View.MemoryView":906 + * + * @cname('__pyx_pybuffer_index') + * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<< + * Py_ssize_t dim) except NULL: + * cdef Py_ssize_t shape, stride, suboffset = -1 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":939 + * + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< + * cdef int ndim = memslice.memview.view.ndim + * + */ + +static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { + int __pyx_v_ndim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + int __pyx_v_i; + int __pyx_v_j; + int __pyx_r; + int __pyx_t_1; + Py_ssize_t *__pyx_t_2; + long __pyx_t_3; + long __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + + /* "View.MemoryView":940 + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: + * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<< + * + * cdef Py_ssize_t *shape = memslice.shape + */ + __pyx_t_1 = __pyx_v_memslice->memview->view.ndim; + __pyx_v_ndim = __pyx_t_1; + + /* "View.MemoryView":942 + * cdef int ndim = memslice.memview.view.ndim + * + * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<< + * cdef Py_ssize_t *strides = memslice.strides + * + */ + __pyx_t_2 = __pyx_v_memslice->shape; + __pyx_v_shape = __pyx_t_2; + + /* "View.MemoryView":943 + * + * cdef Py_ssize_t *shape = memslice.shape + * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = __pyx_v_memslice->strides; + __pyx_v_strides = __pyx_t_2; + + /* "View.MemoryView":947 + * + * cdef int i, j + * for i in range(ndim / 2): # <<<<<<<<<<<<<< + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + */ + __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2); + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":948 + * cdef int i, j + * for i in range(ndim / 2): + * j = ndim - 1 - i # <<<<<<<<<<<<<< + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] + */ + __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i); + + /* "View.MemoryView":949 + * for i in range(ndim / 2): + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<< + * shape[i], shape[j] = shape[j], shape[i] + * + */ + __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]); + __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]); + (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5; + (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6; + + /* "View.MemoryView":950 + * j = ndim - 1 - i + * strides[i], strides[j] = strides[j], strides[i] + * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<< + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + */ + __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]); + __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]); + (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6; + (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5; + + /* "View.MemoryView":952 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + */ + __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0); + __pyx_t_7 = __pyx_t_8; + __pyx_L6_bool_binop_done:; + if (__pyx_t_7) { + + /* "View.MemoryView":953 + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< + * + * return 1 + */ + __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 953, __pyx_L1_error) + + /* "View.MemoryView":952 + * shape[i], shape[j] = shape[j], shape[i] + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<< + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + */ + } + } + + /* "View.MemoryView":955 + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + * return 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "View.MemoryView":939 + * + * @cname('__pyx_memslice_transpose') + * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<< + * cdef int ndim = memslice.memview.view.ndim + * + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":972 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + */ + +/* Python wrapper */ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":973 + * + * def __dealloc__(self): + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<< + * + * cdef convert_item_to_object(self, char *itemp): + */ + __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1); + + /* "View.MemoryView":972 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":975 + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) + */ + +static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":976 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: + */ + __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":977 + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) # <<<<<<<<<<<<<< + * else: + * return memoryview.convert_item_to_object(self, itemp) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":976 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: + */ + } + + /* "View.MemoryView":979 + * return self.to_object_func(itemp) + * else: + * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<< + * + * cdef assign_item_from_object(self, char *itemp, object value): + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":975 + * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + * + * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<< + * if self.to_object_func != NULL: + * return self.to_object_func(itemp) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":981 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) + */ + +static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":982 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: + */ + __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":983 + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<< + * else: + * memoryview.assign_item_from_object(self, itemp, value) + */ + __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 983, __pyx_L1_error) + + /* "View.MemoryView":982 + * + * cdef assign_item_from_object(self, char *itemp, object value): + * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<< + * self.to_dtype_func(itemp, value) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":985 + * self.to_dtype_func(itemp, value) + * else: + * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< + * + * @property + */ + /*else*/ { + __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":981 + * return memoryview.convert_item_to_object(self, itemp) + * + * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<< + * if self.to_dtype_func != NULL: + * self.to_dtype_func(itemp, value) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":988 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":989 + * @property + * def base(self): + * return self.from_object # <<<<<<<<<<<<<< + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->from_object); + __pyx_r = __pyx_v_self->from_object; + goto __pyx_L0; + + /* "View.MemoryView":988 + * + * @property + * def base(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":995 + * + * @cname('__pyx_memoryview_fromslice') + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< + * int ndim, + * object (*to_object_func)(char *), + */ + +static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) { + struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; + Py_ssize_t __pyx_v_suboffset; + PyObject *__pyx_v_length = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_TypeInfo *__pyx_t_4; + Py_buffer __pyx_t_5; + Py_ssize_t *__pyx_t_6; + Py_ssize_t *__pyx_t_7; + Py_ssize_t *__pyx_t_8; + Py_ssize_t __pyx_t_9; + __Pyx_RefNannySetupContext("memoryview_fromslice", 0); + + /* "View.MemoryView":1003 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1004 + * + * if memviewslice.memview == Py_None: + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "View.MemoryView":1003 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "View.MemoryView":1009 + * + * + * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<< + * + * result.from_slice = memviewslice + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1011 + * result = _memoryviewslice(None, 0, dtype_is_object) + * + * result.from_slice = memviewslice # <<<<<<<<<<<<<< + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + */ + __pyx_v_result->from_slice = __pyx_v_memviewslice; + + /* "View.MemoryView":1012 + * + * result.from_slice = memviewslice + * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< + * + * result.from_object = ( memviewslice.memview).base + */ + __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); + + /* "View.MemoryView":1014 + * __PYX_INC_MEMVIEW(&memviewslice, 1) + * + * result.from_object = ( memviewslice.memview).base # <<<<<<<<<<<<<< + * result.typeinfo = memviewslice.memview.typeinfo + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_result->from_object); + __Pyx_DECREF(__pyx_v_result->from_object); + __pyx_v_result->from_object = __pyx_t_2; + __pyx_t_2 = 0; + + /* "View.MemoryView":1015 + * + * result.from_object = ( memviewslice.memview).base + * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<< + * + * result.view = memviewslice.memview.view + */ + __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo; + __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4; + + /* "View.MemoryView":1017 + * result.typeinfo = memviewslice.memview.typeinfo + * + * result.view = memviewslice.memview.view # <<<<<<<<<<<<<< + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + */ + __pyx_t_5 = __pyx_v_memviewslice.memview->view; + __pyx_v_result->__pyx_base.view = __pyx_t_5; + + /* "View.MemoryView":1018 + * + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data # <<<<<<<<<<<<<< + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + */ + __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data); + + /* "View.MemoryView":1019 + * result.view = memviewslice.memview.view + * result.view.buf = memviewslice.data + * result.view.ndim = ndim # <<<<<<<<<<<<<< + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) + */ + __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim; + + /* "View.MemoryView":1020 + * result.view.buf = memviewslice.data + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<< + * Py_INCREF(Py_None) + * + */ + ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None; + + /* "View.MemoryView":1021 + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":1023 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: + */ + __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1024 + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: + * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< + * else: + * result.flags = PyBUF_RECORDS_RO + */ + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; + + /* "View.MemoryView":1023 + * Py_INCREF(Py_None) + * + * if (memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<< + * result.flags = PyBUF_RECORDS + * else: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":1026 + * result.flags = PyBUF_RECORDS + * else: + * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<< + * + * result.view.shape = result.from_slice.shape + */ + /*else*/ { + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO; + } + __pyx_L4:; + + /* "View.MemoryView":1028 + * result.flags = PyBUF_RECORDS_RO + * + * result.view.shape = result.from_slice.shape # <<<<<<<<<<<<<< + * result.view.strides = result.from_slice.strides + * + */ + __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape); + + /* "View.MemoryView":1029 + * + * result.view.shape = result.from_slice.shape + * result.view.strides = result.from_slice.strides # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides); + + /* "View.MemoryView":1032 + * + * + * result.view.suboffsets = NULL # <<<<<<<<<<<<<< + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + */ + __pyx_v_result->__pyx_base.view.suboffsets = NULL; + + /* "View.MemoryView":1033 + * + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<< + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + */ + __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_v_suboffset = (__pyx_t_6[0]); + + /* "View.MemoryView":1034 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break + */ + __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1035 + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets); + + /* "View.MemoryView":1036 + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + * break # <<<<<<<<<<<<<< + * + * result.view.len = result.view.itemsize + */ + goto __pyx_L6_break; + + /* "View.MemoryView":1034 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break + */ + } + } + __pyx_L6_break:; + + /* "View.MemoryView":1038 + * break + * + * result.view.len = result.view.itemsize # <<<<<<<<<<<<<< + * for length in result.view.shape[:ndim]: + * result.view.len *= length + */ + __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + + /* "View.MemoryView":1039 + * + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<< + * result.view.len *= length + * + */ + __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim); + for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) { + __pyx_t_6 = __pyx_t_8; + __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1040 + * result.view.len = result.view.itemsize + * for length in result.view.shape[:ndim]: + * result.view.len *= length # <<<<<<<<<<<<<< + * + * result.to_object_func = to_object_func + */ + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1040, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + } + + /* "View.MemoryView":1042 + * result.view.len *= length + * + * result.to_object_func = to_object_func # <<<<<<<<<<<<<< + * result.to_dtype_func = to_dtype_func + * + */ + __pyx_v_result->to_object_func = __pyx_v_to_object_func; + + /* "View.MemoryView":1043 + * + * result.to_object_func = to_object_func + * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<< + * + * return result + */ + __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func; + + /* "View.MemoryView":1045 + * result.to_dtype_func = to_dtype_func + * + * return result # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":995 + * + * @cname('__pyx_memoryview_fromslice') + * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<< + * int ndim, + * object (*to_object_func)(char *), + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF(__pyx_v_length); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1048 + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + */ + +static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) { + struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0; + __Pyx_memviewslice *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("get_slice_from_memview", 0); + + /* "View.MemoryView":1051 + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1052 + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): + * obj = memview # <<<<<<<<<<<<<< + * return &obj.from_slice + * else: + */ + if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1052, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_v_memview); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":1053 + * if isinstance(memview, _memoryviewslice): + * obj = memview + * return &obj.from_slice # <<<<<<<<<<<<<< + * else: + * slice_copy(memview, mslice) + */ + __pyx_r = (&__pyx_v_obj->from_slice); + goto __pyx_L0; + + /* "View.MemoryView":1051 + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice + */ + } + + /* "View.MemoryView":1055 + * return &obj.from_slice + * else: + * slice_copy(memview, mslice) # <<<<<<<<<<<<<< + * return mslice + * + */ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); + + /* "View.MemoryView":1056 + * else: + * slice_copy(memview, mslice) + * return mslice # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_slice_copy') + */ + __pyx_r = __pyx_v_mslice; + goto __pyx_L0; + } + + /* "View.MemoryView":1048 + * + * @cname('__pyx_memoryview_get_slice_from_memoryview') + * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1059 + * + * @cname('__pyx_memoryview_slice_copy') + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< + * cdef int dim + * cdef (Py_ssize_t*) shape, strides, suboffsets + */ + +static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) { + int __pyx_v_dim; + Py_ssize_t *__pyx_v_shape; + Py_ssize_t *__pyx_v_strides; + Py_ssize_t *__pyx_v_suboffsets; + __Pyx_RefNannyDeclarations + Py_ssize_t *__pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + __Pyx_RefNannySetupContext("slice_copy", 0); + + /* "View.MemoryView":1063 + * cdef (Py_ssize_t*) shape, strides, suboffsets + * + * shape = memview.view.shape # <<<<<<<<<<<<<< + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets + */ + __pyx_t_1 = __pyx_v_memview->view.shape; + __pyx_v_shape = __pyx_t_1; + + /* "View.MemoryView":1064 + * + * shape = memview.view.shape + * strides = memview.view.strides # <<<<<<<<<<<<<< + * suboffsets = memview.view.suboffsets + * + */ + __pyx_t_1 = __pyx_v_memview->view.strides; + __pyx_v_strides = __pyx_t_1; + + /* "View.MemoryView":1065 + * shape = memview.view.shape + * strides = memview.view.strides + * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<< + * + * dst.memview = <__pyx_memoryview *> memview + */ + __pyx_t_1 = __pyx_v_memview->view.suboffsets; + __pyx_v_suboffsets = __pyx_t_1; + + /* "View.MemoryView":1067 + * suboffsets = memview.view.suboffsets + * + * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<< + * dst.data = memview.view.buf + * + */ + __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview); + + /* "View.MemoryView":1068 + * + * dst.memview = <__pyx_memoryview *> memview + * dst.data = memview.view.buf # <<<<<<<<<<<<<< + * + * for dim in range(memview.view.ndim): + */ + __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf); + + /* "View.MemoryView":1070 + * dst.data = memview.view.buf + * + * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<< + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + */ + __pyx_t_2 = __pyx_v_memview->view.ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_dim = __pyx_t_4; + + /* "View.MemoryView":1071 + * + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<< + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + */ + (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]); + + /* "View.MemoryView":1072 + * for dim in range(memview.view.ndim): + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<< + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + * + */ + (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]); + + /* "View.MemoryView":1073 + * dst.shape[dim] = shape[dim] + * dst.strides[dim] = strides[dim] + * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object') + */ + if ((__pyx_v_suboffsets != 0)) { + __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]); + } else { + __pyx_t_5 = -1L; + } + (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5; + } + + /* "View.MemoryView":1059 + * + * @cname('__pyx_memoryview_slice_copy') + * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<< + * cdef int dim + * cdef (Py_ssize_t*) shape, strides, suboffsets + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":1076 + * + * @cname('__pyx_memoryview_copy_object') + * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + */ + +static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) { + __Pyx_memviewslice __pyx_v_memviewslice; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("memoryview_copy", 0); + + /* "View.MemoryView":1079 + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<< + * return memoryview_copy_from_slice(memview, &memviewslice) + * + */ + __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice)); + + /* "View.MemoryView":1080 + * cdef __Pyx_memviewslice memviewslice + * slice_copy(memview, &memviewslice) + * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_object_from_slice') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1076 + * + * @cname('__pyx_memoryview_copy_object') + * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<< + * "Create a new memoryview object" + * cdef __Pyx_memviewslice memviewslice + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1083 + * + * @cname('__pyx_memoryview_copy_object_from_slice') + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< + * """ + * Create a new memoryview object from a given memoryview object and slice. + */ + +static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) { + PyObject *(*__pyx_v_to_object_func)(char *); + int (*__pyx_v_to_dtype_func)(char *, PyObject *); + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *(*__pyx_t_3)(char *); + int (*__pyx_t_4)(char *, PyObject *); + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); + + /* "View.MemoryView":1090 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + */ + __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1091 + * + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<< + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + */ + __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func; + __pyx_v_to_object_func = __pyx_t_3; + + /* "View.MemoryView":1092 + * if isinstance(memview, _memoryviewslice): + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<< + * else: + * to_object_func = NULL + */ + __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func; + __pyx_v_to_dtype_func = __pyx_t_4; + + /* "View.MemoryView":1090 + * cdef int (*to_dtype_func)(char *, object) except 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * to_object_func = (<_memoryviewslice> memview).to_object_func + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1094 + * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + * else: + * to_object_func = NULL # <<<<<<<<<<<<<< + * to_dtype_func = NULL + * + */ + /*else*/ { + __pyx_v_to_object_func = NULL; + + /* "View.MemoryView":1095 + * else: + * to_object_func = NULL + * to_dtype_func = NULL # <<<<<<<<<<<<<< + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + */ + __pyx_v_to_dtype_func = NULL; + } + __pyx_L3:; + + /* "View.MemoryView":1097 + * to_dtype_func = NULL + * + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<< + * to_object_func, to_dtype_func, + * memview.dtype_is_object) + */ + __Pyx_XDECREF(__pyx_r); + + /* "View.MemoryView":1099 + * return memoryview_fromslice(memviewslice[0], memview.view.ndim, + * to_object_func, to_dtype_func, + * memview.dtype_is_object) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1083 + * + * @cname('__pyx_memoryview_copy_object_from_slice') + * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<< + * """ + * Create a new memoryview object from a given memoryview object and slice. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1105 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< + * if arg < 0: + * return -arg + */ + +static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) { + Py_ssize_t __pyx_r; + int __pyx_t_1; + + /* "View.MemoryView":1106 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: # <<<<<<<<<<<<<< + * return -arg + * else: + */ + __pyx_t_1 = ((__pyx_v_arg < 0) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1107 + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: + * return -arg # <<<<<<<<<<<<<< + * else: + * return arg + */ + __pyx_r = (-__pyx_v_arg); + goto __pyx_L0; + + /* "View.MemoryView":1106 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: # <<<<<<<<<<<<<< + * return -arg + * else: + */ + } + + /* "View.MemoryView":1109 + * return -arg + * else: + * return arg # <<<<<<<<<<<<<< + * + * @cname('__pyx_get_best_slice_order') + */ + /*else*/ { + __pyx_r = __pyx_v_arg; + goto __pyx_L0; + } + + /* "View.MemoryView":1105 + * + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<< + * if arg < 0: + * return -arg + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1112 + * + * @cname('__pyx_get_best_slice_order') + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< + * """ + * Figure out the best memory access order for a given slice. + */ + +static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_c_stride; + Py_ssize_t __pyx_v_f_stride; + char __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1117 + * """ + * cdef int i + * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< + * cdef Py_ssize_t f_stride = 0 + * + */ + __pyx_v_c_stride = 0; + + /* "View.MemoryView":1118 + * cdef int i + * cdef Py_ssize_t c_stride = 0 + * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): + */ + __pyx_v_f_stride = 0; + + /* "View.MemoryView":1120 + * cdef Py_ssize_t f_stride = 0 + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + */ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1121 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break + */ + __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1122 + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1123 + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + goto __pyx_L4_break; + + /* "View.MemoryView":1121 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L4_break:; + + /* "View.MemoryView":1125 + * break + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + */ + __pyx_t_1 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_1; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1126 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break + */ + __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1127 + * for i in range(ndim): + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] # <<<<<<<<<<<<<< + * break + * + */ + __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1128 + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + */ + goto __pyx_L7_break; + + /* "View.MemoryView":1126 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L7_break:; + + /* "View.MemoryView":1130 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: + */ + __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1131 + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + * return 'C' # <<<<<<<<<<<<<< + * else: + * return 'F' + */ + __pyx_r = 'C'; + goto __pyx_L0; + + /* "View.MemoryView":1130 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: + */ + } + + /* "View.MemoryView":1133 + * return 'C' + * else: + * return 'F' # <<<<<<<<<<<<<< + * + * @cython.cdivision(True) + */ + /*else*/ { + __pyx_r = 'F'; + goto __pyx_L0; + } + + /* "View.MemoryView":1112 + * + * @cname('__pyx_get_best_slice_order') + * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<< + * """ + * Figure out the best memory access order for a given slice. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1136 + * + * @cython.cdivision(True) + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< + * char *dst_data, Py_ssize_t *dst_strides, + * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, + */ + +static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent; + Py_ssize_t __pyx_v_dst_extent; + Py_ssize_t __pyx_v_src_stride; + Py_ssize_t __pyx_v_dst_stride; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + + /* "View.MemoryView":1143 + * + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + */ + __pyx_v_src_extent = (__pyx_v_src_shape[0]); + + /* "View.MemoryView":1144 + * cdef Py_ssize_t i + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] + */ + __pyx_v_dst_extent = (__pyx_v_dst_shape[0]); + + /* "View.MemoryView":1145 + * cdef Py_ssize_t src_extent = src_shape[0] + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + */ + __pyx_v_src_stride = (__pyx_v_src_strides[0]); + + /* "View.MemoryView":1146 + * cdef Py_ssize_t dst_extent = dst_shape[0] + * cdef Py_ssize_t src_stride = src_strides[0] + * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: + */ + __pyx_v_dst_stride = (__pyx_v_dst_strides[0]); + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + */ + __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + + /* "View.MemoryView":1150 + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + */ + __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize); + if (__pyx_t_2) { + __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride)); + } + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + if (__pyx_t_1) { + + /* "View.MemoryView":1151 + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): + */ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent))); + + /* "View.MemoryView":1149 + * + * if ndim == 1: + * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<< + * src_stride == itemsize == dst_stride): + * memcpy(dst_data, src_data, itemsize * dst_extent) + */ + goto __pyx_L4; + } + + /* "View.MemoryView":1153 + * memcpy(dst_data, src_data, itemsize * dst_extent) + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + */ + /*else*/ { + __pyx_t_4 = __pyx_v_dst_extent; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1154 + * else: + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< + * src_data += src_stride + * dst_data += dst_stride + */ + (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize)); + + /* "View.MemoryView":1155 + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * else: + */ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1156 + * memcpy(dst_data, src_data, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * else: + * for i in range(dst_extent): + */ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L4:; + + /* "View.MemoryView":1148 + * cdef Py_ssize_t dst_stride = dst_strides[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * if (src_stride > 0 and dst_stride > 0 and + * src_stride == itemsize == dst_stride): + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1158 + * dst_data += dst_stride + * else: + * for i in range(dst_extent): # <<<<<<<<<<<<<< + * _copy_strided_to_strided(src_data, src_strides + 1, + * dst_data, dst_strides + 1, + */ + /*else*/ { + __pyx_t_4 = __pyx_v_dst_extent; + __pyx_t_5 = __pyx_t_4; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1159 + * else: + * for i in range(dst_extent): + * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<< + * dst_data, dst_strides + 1, + * src_shape + 1, dst_shape + 1, + */ + _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize); + + /* "View.MemoryView":1163 + * src_shape + 1, dst_shape + 1, + * ndim - 1, itemsize) + * src_data += src_stride # <<<<<<<<<<<<<< + * dst_data += dst_stride + * + */ + __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride); + + /* "View.MemoryView":1164 + * ndim - 1, itemsize) + * src_data += src_stride + * dst_data += dst_stride # <<<<<<<<<<<<<< + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, + */ + __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1136 + * + * @cython.cdivision(True) + * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<< + * char *dst_data, Py_ssize_t *dst_strides, + * Py_ssize_t *src_shape, Py_ssize_t *dst_shape, + */ + + /* function exit code */ +} + +/* "View.MemoryView":1166 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + */ + +static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) { + + /* "View.MemoryView":1169 + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<< + * src.shape, dst.shape, ndim, itemsize) + * + */ + _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1166 + * dst_data += dst_stride + * + * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *dst, + * int ndim, size_t itemsize) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1173 + * + * @cname('__pyx_memoryview_slice_get_size') + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + */ + +static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) { + int __pyx_v_i; + Py_ssize_t __pyx_v_size; + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1176 + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + * cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_size = __pyx_t_1; + + /* "View.MemoryView":1178 + * cdef Py_ssize_t size = src.memview.view.itemsize + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * size *= src.shape[i] + * + */ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1179 + * + * for i in range(ndim): + * size *= src.shape[i] # <<<<<<<<<<<<<< + * + * return size + */ + __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i])); + } + + /* "View.MemoryView":1181 + * size *= src.shape[i] + * + * return size # <<<<<<<<<<<<<< + * + * @cname('__pyx_fill_contig_strides_array') + */ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "View.MemoryView":1173 + * + * @cname('__pyx_memoryview_slice_get_size') + * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<< + * "Return the size of the memory occupied by the slice in number of bytes" + * cdef int i + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1184 + * + * @cname('__pyx_fill_contig_strides_array') + * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, + * int ndim, char order) nogil: + */ + +static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) { + int __pyx_v_idx; + Py_ssize_t __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + + /* "View.MemoryView":1193 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride + */ + __pyx_t_1 = ((__pyx_v_order == 'F') != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1194 + * + * if order == 'F': + * for idx in range(ndim): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride = stride * shape[idx] + */ + __pyx_t_2 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_idx = __pyx_t_4; + + /* "View.MemoryView":1195 + * if order == 'F': + * for idx in range(ndim): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride = stride * shape[idx] + * else: + */ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1196 + * for idx in range(ndim): + * strides[idx] = stride + * stride = stride * shape[idx] # <<<<<<<<<<<<<< + * else: + * for idx in range(ndim - 1, -1, -1): + */ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + + /* "View.MemoryView":1193 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1198 + * stride = stride * shape[idx] + * else: + * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride = stride * shape[idx] + */ + /*else*/ { + for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) { + __pyx_v_idx = __pyx_t_2; + + /* "View.MemoryView":1199 + * else: + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride # <<<<<<<<<<<<<< + * stride = stride * shape[idx] + * + */ + (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride; + + /* "View.MemoryView":1200 + * for idx in range(ndim - 1, -1, -1): + * strides[idx] = stride + * stride = stride * shape[idx] # <<<<<<<<<<<<<< + * + * return stride + */ + __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx])); + } + } + __pyx_L3:; + + /* "View.MemoryView":1202 + * stride = stride * shape[idx] + * + * return stride # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_data_to_temp') + */ + __pyx_r = __pyx_v_stride; + goto __pyx_L0; + + /* "View.MemoryView":1184 + * + * @cname('__pyx_fill_contig_strides_array') + * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<< + * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, + * int ndim, char order) nogil: + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1205 + * + * @cname('__pyx_memoryview_copy_data_to_temp') + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *tmpslice, + * char order, + */ + +static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) { + int __pyx_v_i; + void *__pyx_v_result; + size_t __pyx_v_itemsize; + size_t __pyx_v_size; + void *__pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + struct __pyx_memoryview_obj *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + + /* "View.MemoryView":1216 + * cdef void *result + * + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef size_t size = slice_get_size(src, ndim) + * + */ + __pyx_t_1 = __pyx_v_src->memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1217 + * + * cdef size_t itemsize = src.memview.view.itemsize + * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<< + * + * result = malloc(size) + */ + __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim); + + /* "View.MemoryView":1219 + * cdef size_t size = slice_get_size(src, ndim) + * + * result = malloc(size) # <<<<<<<<<<<<<< + * if not result: + * _err(MemoryError, NULL) + */ + __pyx_v_result = malloc(__pyx_v_size); + + /* "View.MemoryView":1220 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1221 + * result = malloc(size) + * if not result: + * _err(MemoryError, NULL) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error) + + /* "View.MemoryView":1220 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + } + + /* "View.MemoryView":1224 + * + * + * tmpslice.data = result # <<<<<<<<<<<<<< + * tmpslice.memview = src.memview + * for i in range(ndim): + */ + __pyx_v_tmpslice->data = ((char *)__pyx_v_result); + + /* "View.MemoryView":1225 + * + * tmpslice.data = result + * tmpslice.memview = src.memview # <<<<<<<<<<<<<< + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + */ + __pyx_t_4 = __pyx_v_src->memview; + __pyx_v_tmpslice->memview = __pyx_t_4; + + /* "View.MemoryView":1226 + * tmpslice.data = result + * tmpslice.memview = src.memview + * for i in range(ndim): # <<<<<<<<<<<<<< + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 + */ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1227 + * tmpslice.memview = src.memview + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<< + * tmpslice.suboffsets[i] = -1 + * + */ + (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]); + + /* "View.MemoryView":1228 + * for i in range(ndim): + * tmpslice.shape[i] = src.shape[i] + * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, + */ + (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1230 + * tmpslice.suboffsets[i] = -1 + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<< + * ndim, order) + * + */ + (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order)); + + /* "View.MemoryView":1234 + * + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 + */ + __pyx_t_3 = __pyx_v_ndim; + __pyx_t_5 = __pyx_t_3; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * + */ + __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1236 + * for i in range(ndim): + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< + * + * if slice_is_contig(src[0], order, ndim): + */ + (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1235 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * + */ + } + } + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1239 + * + * if slice_is_contig(src[0], order, ndim): + * memcpy(result, src.data, size) # <<<<<<<<<<<<<< + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + */ + (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size)); + + /* "View.MemoryView":1238 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + goto __pyx_L9; + } + + /* "View.MemoryView":1241 + * memcpy(result, src.data, size) + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<< + * + * return result + */ + /*else*/ { + copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize); + } + __pyx_L9:; + + /* "View.MemoryView":1243 + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":1205 + * + * @cname('__pyx_memoryview_copy_data_to_temp') + * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice *tmpslice, + * char order, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = NULL; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1248 + * + * @cname('__pyx_memoryview_err_extents') + * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + */ + +static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_extents", 0); + + /* "View.MemoryView":1251 + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + * (i, extent1, extent2)) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err_dim') + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + + /* "View.MemoryView":1250 + * cdef int _err_extents(int i, Py_ssize_t extent1, + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<< + * (i, extent1, extent2)) + * + */ + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 1250, __pyx_L1_error) + + /* "View.MemoryView":1248 + * + * @cname('__pyx_memoryview_err_extents') + * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<< + * Py_ssize_t extent2) except -1 with gil: + * raise ValueError("got differing extents in dimension %d (got %d and %d)" % + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1254 + * + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii') % dim) + * + */ + +static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_dim", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1255 + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: + * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_err') + */ + __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(__pyx_v_error); + __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 1255, __pyx_L1_error) + + /* "View.MemoryView":1254 + * + * @cname('__pyx_memoryview_err_dim') + * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii') % dim) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_error); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1258 + * + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< + * if msg != NULL: + * raise error(msg.decode('ascii')) + */ + +static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1259 + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii')) + * else: + */ + __pyx_t_1 = ((__pyx_v_msg != NULL) != 0); + if (unlikely(__pyx_t_1)) { + + /* "View.MemoryView":1260 + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: + * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<< + * else: + * raise error + */ + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_error); + __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 1260, __pyx_L1_error) + + /* "View.MemoryView":1259 + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: + * if msg != NULL: # <<<<<<<<<<<<<< + * raise error(msg.decode('ascii')) + * else: + */ + } + + /* "View.MemoryView":1262 + * raise error(msg.decode('ascii')) + * else: + * raise error # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_contents') + */ + /*else*/ { + __Pyx_Raise(__pyx_v_error, 0, 0, 0); + __PYX_ERR(1, 1262, __pyx_L1_error) + } + + /* "View.MemoryView":1258 + * + * @cname('__pyx_memoryview_err') + * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<< + * if msg != NULL: + * raise error(msg.decode('ascii')) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_error); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1265 + * + * @cname('__pyx_memoryview_copy_contents') + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice dst, + * int src_ndim, int dst_ndim, + */ + +static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) { + void *__pyx_v_tmpdata; + size_t __pyx_v_itemsize; + int __pyx_v_i; + char __pyx_v_order; + int __pyx_v_broadcasting; + int __pyx_v_direct_copy; + __Pyx_memviewslice __pyx_v_tmp; + int __pyx_v_ndim; + int __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + void *__pyx_t_7; + int __pyx_t_8; + + /* "View.MemoryView":1273 + * Check for overlapping memory and verify the shapes. + * """ + * cdef void *tmpdata = NULL # <<<<<<<<<<<<<< + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + */ + __pyx_v_tmpdata = NULL; + + /* "View.MemoryView":1274 + * """ + * cdef void *tmpdata = NULL + * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<< + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + */ + __pyx_t_1 = __pyx_v_src.memview->view.itemsize; + __pyx_v_itemsize = __pyx_t_1; + + /* "View.MemoryView":1276 + * cdef size_t itemsize = src.memview.view.itemsize + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<< + * cdef bint broadcasting = False + * cdef bint direct_copy = False + */ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim); + + /* "View.MemoryView":1277 + * cdef int i + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False # <<<<<<<<<<<<<< + * cdef bint direct_copy = False + * cdef __Pyx_memviewslice tmp + */ + __pyx_v_broadcasting = 0; + + /* "View.MemoryView":1278 + * cdef char order = get_best_order(&src, src_ndim) + * cdef bint broadcasting = False + * cdef bint direct_copy = False # <<<<<<<<<<<<<< + * cdef __Pyx_memviewslice tmp + * + */ + __pyx_v_direct_copy = 0; + + /* "View.MemoryView":1281 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + */ + __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1282 + * + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) + */ + __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim); + + /* "View.MemoryView":1281 + * cdef __Pyx_memviewslice tmp + * + * if src_ndim < dst_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1283 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + */ + __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1284 + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: + * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<< + * + * cdef int ndim = max(src_ndim, dst_ndim) + */ + __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim); + + /* "View.MemoryView":1283 + * if src_ndim < dst_ndim: + * broadcast_leading(&src, src_ndim, dst_ndim) + * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<< + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + */ + } + __pyx_L3:; + + /* "View.MemoryView":1286 + * broadcast_leading(&dst, dst_ndim, src_ndim) + * + * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + __pyx_t_3 = __pyx_v_dst_ndim; + __pyx_t_4 = __pyx_v_src_ndim; + if (((__pyx_t_3 > __pyx_t_4) != 0)) { + __pyx_t_5 = __pyx_t_3; + } else { + __pyx_t_5 = __pyx_t_4; + } + __pyx_v_ndim = __pyx_t_5; + + /* "View.MemoryView":1288 + * cdef int ndim = max(src_ndim, dst_ndim) + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + */ + __pyx_t_5 = __pyx_v_ndim; + __pyx_t_3 = __pyx_t_5; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1289 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True + */ + __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1290 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 + */ + __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1291 + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: + * broadcasting = True # <<<<<<<<<<<<<< + * src.strides[i] = 0 + * else: + */ + __pyx_v_broadcasting = 1; + + /* "View.MemoryView":1292 + * if src.shape[i] == 1: + * broadcasting = True + * src.strides[i] = 0 # <<<<<<<<<<<<<< + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) + */ + (__pyx_v_src.strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1290 + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: + * if src.shape[i] == 1: # <<<<<<<<<<<<<< + * broadcasting = True + * src.strides[i] = 0 + */ + goto __pyx_L7; + } + + /* "View.MemoryView":1294 + * src.strides[i] = 0 + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< + * + * if src.suboffsets[i] >= 0: + */ + /*else*/ { + __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error) + } + __pyx_L7:; + + /* "View.MemoryView":1289 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True + */ + } + + /* "View.MemoryView":1296 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + */ + __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1297 + * + * if src.suboffsets[i] >= 0: + * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< + * + * if slices_overlap(&src, &dst, ndim, itemsize): + */ + __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error) + + /* "View.MemoryView":1296 + * _err_extents(i, dst.shape[i], src.shape[i]) + * + * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<< + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + */ + } + } + + /* "View.MemoryView":1299 + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): + */ + __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1301 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * + */ + __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1302 + * + * if not slice_is_contig(src, order, ndim): + * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<< + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + */ + __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim); + + /* "View.MemoryView":1301 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * + */ + } + + /* "View.MemoryView":1304 + * order = get_best_order(&dst, ndim) + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< + * src = tmp + * + */ + __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error) + __pyx_v_tmpdata = __pyx_t_7; + + /* "View.MemoryView":1305 + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + * src = tmp # <<<<<<<<<<<<<< + * + * if not broadcasting: + */ + __pyx_v_src = __pyx_v_tmp; + + /* "View.MemoryView":1299 + * _err_dim(ValueError, "Dimension %d is not direct", i) + * + * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<< + * + * if not slice_is_contig(src, order, ndim): + */ + } + + /* "View.MemoryView":1307 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1310 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1311 + * + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<< + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) + */ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim); + + /* "View.MemoryView":1310 + * + * + * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + */ + goto __pyx_L12; + } + + /* "View.MemoryView":1312 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1313 + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): + * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<< + * + * if direct_copy: + */ + __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim); + + /* "View.MemoryView":1312 + * if slice_is_contig(src, 'C', ndim): + * direct_copy = slice_is_contig(dst, 'C', ndim) + * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<< + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + */ + } + __pyx_L12:; + + /* "View.MemoryView":1315 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + __pyx_t_2 = (__pyx_v_direct_copy != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1317 + * if direct_copy: + * + * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1318 + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) + */ + (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim))); + + /* "View.MemoryView":1319 + * refcount_copying(&dst, dtype_is_object, ndim, False) + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * free(tmpdata) + * return 0 + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1320 + * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * + */ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1321 + * refcount_copying(&dst, dtype_is_object, ndim, True) + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * if order == 'F' == get_best_order(&dst, ndim): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1315 + * direct_copy = slice_is_contig(dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + } + + /* "View.MemoryView":1307 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1323 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = (__pyx_v_order == 'F'); + if (__pyx_t_2) { + __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim)); + } + __pyx_t_8 = (__pyx_t_2 != 0); + if (__pyx_t_8) { + + /* "View.MemoryView":1326 + * + * + * transpose_memslice(&src) # <<<<<<<<<<<<<< + * transpose_memslice(&dst) + * + */ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1326, __pyx_L1_error) + + /* "View.MemoryView":1327 + * + * transpose_memslice(&src) + * transpose_memslice(&dst) # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1327, __pyx_L1_error) + + /* "View.MemoryView":1323 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1329 + * transpose_memslice(&dst) + * + * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1330 + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<< + * refcount_copying(&dst, dtype_is_object, ndim, True) + * + */ + copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize); + + /* "View.MemoryView":1331 + * refcount_copying(&dst, dtype_is_object, ndim, False) + * copy_strided_to_strided(&src, &dst, ndim, itemsize) + * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * + * free(tmpdata) + */ + __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1333 + * refcount_copying(&dst, dtype_is_object, ndim, True) + * + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * + */ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1334 + * + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_broadcast_leading') + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1265 + * + * @cname('__pyx_memoryview_copy_contents') + * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<< + * __Pyx_memviewslice dst, + * int src_ndim, int dst_ndim, + */ + + /* function exit code */ + __pyx_L1_error:; + { + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1337 + * + * @cname('__pyx_memoryview_broadcast_leading') + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< + * int ndim, + * int ndim_other) nogil: + */ + +static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) { + int __pyx_v_i; + int __pyx_v_offset; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + + /* "View.MemoryView":1341 + * int ndim_other) nogil: + * cdef int i + * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<< + * + * for i in range(ndim - 1, -1, -1): + */ + __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim); + + /* "View.MemoryView":1343 + * cdef int offset = ndim_other - ndim + * + * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<< + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + */ + for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1344 + * + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<< + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + */ + (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]); + + /* "View.MemoryView":1345 + * for i in range(ndim - 1, -1, -1): + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<< + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + */ + (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]); + + /* "View.MemoryView":1346 + * mslice.shape[i + offset] = mslice.shape[i] + * mslice.strides[i + offset] = mslice.strides[i] + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<< + * + * for i in range(offset): + */ + (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]); + } + + /* "View.MemoryView":1348 + * mslice.suboffsets[i + offset] = mslice.suboffsets[i] + * + * for i in range(offset): # <<<<<<<<<<<<<< + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + */ + __pyx_t_1 = __pyx_v_offset; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1349 + * + * for i in range(offset): + * mslice.shape[i] = 1 # <<<<<<<<<<<<<< + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 + */ + (__pyx_v_mslice->shape[__pyx_v_i]) = 1; + + /* "View.MemoryView":1350 + * for i in range(offset): + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<< + * mslice.suboffsets[i] = -1 + * + */ + (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]); + + /* "View.MemoryView":1351 + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1337 + * + * @cname('__pyx_memoryview_broadcast_leading') + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< + * int ndim, + * int ndim_other) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1359 + * + * @cname('__pyx_memoryview_refcount_copying') + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< + * int ndim, bint inc) nogil: + * + */ + +static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) { + int __pyx_t_1; + + /* "View.MemoryView":1363 + * + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, + * dst.strides, ndim, inc) + */ + __pyx_t_1 = (__pyx_v_dtype_is_object != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1364 + * + * if dtype_is_object: + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<< + * dst.strides, ndim, inc) + * + */ + __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1363 + * + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, + * dst.strides, ndim, inc) + */ + } + + /* "View.MemoryView":1359 + * + * @cname('__pyx_memoryview_refcount_copying') + * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<< + * int ndim, bint inc) nogil: + * + */ + + /* function exit code */ +} + +/* "View.MemoryView":1368 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + */ + +static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + __Pyx_RefNannyDeclarations + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0); + + /* "View.MemoryView":1371 + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc); + + /* "View.MemoryView":1368 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') + * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * bint inc) with gil: + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + __Pyx_PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "View.MemoryView":1374 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, bint inc): + * cdef Py_ssize_t i + */ + +static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0); + + /* "View.MemoryView":1378 + * cdef Py_ssize_t i + * + * for i in range(shape[0]): # <<<<<<<<<<<<<< + * if ndim == 1: + * if inc: + */ + __pyx_t_1 = (__pyx_v_shape[0]); + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1379 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + __pyx_t_4 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":1380 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + __pyx_t_4 = (__pyx_v_inc != 0); + if (__pyx_t_4) { + + /* "View.MemoryView":1381 + * if ndim == 1: + * if inc: + * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * Py_DECREF(( data)[0]) + */ + Py_INCREF((((PyObject **)__pyx_v_data)[0])); + + /* "View.MemoryView":1380 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":1383 + * Py_INCREF(( data)[0]) + * else: + * Py_DECREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, + */ + /*else*/ { + Py_DECREF((((PyObject **)__pyx_v_data)[0])); + } + __pyx_L6:; + + /* "View.MemoryView":1379 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + goto __pyx_L5; + } + + /* "View.MemoryView":1385 + * Py_DECREF(( data)[0]) + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< + * ndim - 1, inc) + * + */ + /*else*/ { + + /* "View.MemoryView":1386 + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, + * ndim - 1, inc) # <<<<<<<<<<<<<< + * + * data += strides[0] + */ + __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc); + } + __pyx_L5:; + + /* "View.MemoryView":1388 + * ndim - 1, inc) + * + * data += strides[0] # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0])); + } + + /* "View.MemoryView":1374 + * + * @cname('__pyx_memoryview_refcount_objects_in_slice') + * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, bint inc): + * cdef Py_ssize_t i + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":1394 + * + * @cname('__pyx_memoryview_slice_assign_scalar') + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + */ + +static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) { + + /* "View.MemoryView":1397 + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<< + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, + * itemsize, item) + */ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0); + + /* "View.MemoryView":1398 + * bint dtype_is_object) nogil: + * refcount_copying(dst, dtype_is_object, ndim, False) + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<< + * itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, True) + */ + __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1400 + * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, + * itemsize, item) + * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<< + * + * + */ + __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1); + + /* "View.MemoryView":1394 + * + * @cname('__pyx_memoryview_slice_assign_scalar') + * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<< + * size_t itemsize, void *item, + * bint dtype_is_object) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1404 + * + * @cname('__pyx_memoryview__slice_assign_scalar') + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * size_t itemsize, void *item) nogil: + */ + +static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) { + CYTHON_UNUSED Py_ssize_t __pyx_v_i; + Py_ssize_t __pyx_v_stride; + Py_ssize_t __pyx_v_extent; + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + + /* "View.MemoryView":1408 + * size_t itemsize, void *item) nogil: + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<< + * cdef Py_ssize_t extent = shape[0] + * + */ + __pyx_v_stride = (__pyx_v_strides[0]); + + /* "View.MemoryView":1409 + * cdef Py_ssize_t i + * cdef Py_ssize_t stride = strides[0] + * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<< + * + * if ndim == 1: + */ + __pyx_v_extent = (__pyx_v_shape[0]); + + /* "View.MemoryView":1411 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) + */ + __pyx_t_1 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":1412 + * + * if ndim == 1: + * for i in range(extent): # <<<<<<<<<<<<<< + * memcpy(data, item, itemsize) + * data += stride + */ + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1413 + * if ndim == 1: + * for i in range(extent): + * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< + * data += stride + * else: + */ + (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize)); + + /* "View.MemoryView":1414 + * for i in range(extent): + * memcpy(data, item, itemsize) + * data += stride # <<<<<<<<<<<<<< + * else: + * for i in range(extent): + */ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + + /* "View.MemoryView":1411 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1416 + * data += stride + * else: + * for i in range(extent): # <<<<<<<<<<<<<< + * _slice_assign_scalar(data, shape + 1, strides + 1, + * ndim - 1, itemsize, item) + */ + /*else*/ { + __pyx_t_2 = __pyx_v_extent; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "View.MemoryView":1417 + * else: + * for i in range(extent): + * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< + * ndim - 1, itemsize, item) + * data += stride + */ + __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item); + + /* "View.MemoryView":1419 + * _slice_assign_scalar(data, shape + 1, strides + 1, + * ndim - 1, itemsize, item) + * data += stride # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_data = (__pyx_v_data + __pyx_v_stride); + } + } + __pyx_L3:; + + /* "View.MemoryView":1404 + * + * @cname('__pyx_memoryview__slice_assign_scalar') + * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<< + * Py_ssize_t *strides, int ndim, + * size_t itemsize, void *item) nogil: + */ + + /* function exit code */ +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + */ + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0); + if (__pyx_t_1) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v___pyx_PickleError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum != 0xb068931: + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v___pyx_PickleError); + __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(1, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v___pyx_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + __pyx_t_1 = (__pyx_v___pyx_state != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { + + /* "(tree fragment)":9 + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + */ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) + * __pyx_result = Enum.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + */ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->name); + __Pyx_DECREF(__pyx_v___pyx_result->name); + __pyx_v___pyx_result->name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(1, 13, __pyx_L1_error) + } + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_3 > 1) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) + */ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static struct __pyx_vtabstruct_6PyCafe_MemoryNanny __pyx_vtable_6PyCafe_MemoryNanny; + +static PyObject *__pyx_tp_new_6PyCafe_MemoryNanny(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_MemoryNanny *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_MemoryNanny *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_MemoryNanny; + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_MemoryNanny(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_6PyCafe_11MemoryNanny_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_MemoryNanny[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_11MemoryNanny_3__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_11MemoryNanny_5__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_MemoryNanny = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.MemoryNanny", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_MemoryNanny), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_MemoryNanny, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_MemoryNanny, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_MemoryNanny, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_CyCa(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_CyCa *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CyCa *)o); + new((void*)&(p->INVALID_ENUM_RETURN_STRING)) std::string(); + if (unlikely(__pyx_pw_6PyCafe_4CyCa_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCa(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCa *p = (struct __pyx_obj_6PyCafe_CyCa *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + __Pyx_call_destructor(p->INVALID_ENUM_RETURN_STRING); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBE_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_LOG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBE_LOG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_ARCHIVE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBE_ARCHIVE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBE_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBE_PROPERTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBE_PROPERTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PRIMITIVE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_PRIMITIVE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PLAIN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_PLAIN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_STS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_TIME_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9CY_DBR_GR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_CTRL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_PUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_PUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STSACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_STSACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CLASS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_CLASS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_NONE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_NONE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10CY_DBR_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12CY_DBR_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11CY_DBR_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_STS_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_STS_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_STS_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_STS_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_TIME_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_TIME_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_TIME_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_TIME_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_DBR_GR_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_GR_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_DBR_GR_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_GR_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_SHORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_SHORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_INT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_DBR_CTRL_INT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_FLOAT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_DBR_CTRL_FLOAT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_ENUM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_ENUM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_CHAR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_CHAR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_LONG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_DBR_CTRL_LONG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_DOUBLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_DBR_CTRL_DOUBLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORMAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_NORMAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_ALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_TOLARGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_TOLARGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADTYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADTYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_INTERNAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_INTERNAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_GETFAIL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_GETFAIL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTFAIL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_PUTFAIL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_BADSTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_DISCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_DISCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_DBLCHNL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_DBLCHNL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_EVDISALLOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_EVDISALLOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMONID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15CY_ECA_BADMONID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMASK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADMASK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_IODONE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13CY_ECA_IODONE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_IOINPROGRESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19CY_ECA_IOINPROGRESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSYNCGRP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADSYNCGRP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTCBINPROG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_PUTCBINPROG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORDACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_NORDACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOWTACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_NOWTACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ANACHRONISM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_ANACHRONISM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOSEARCHADDR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19CY_ECA_NOSEARCHADDR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOCONVERT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_ECA_NOCONVERT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCHID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_BADCHID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADFUNCPTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_BADFUNCPTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_ISATTACHED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_ISATTACHED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNAVAILINSERV(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20CY_ECA_UNAVAILINSERV_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_CHANDESTROY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_CHANDESTROY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADPRIORITY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_BADPRIORITY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOTTHREADED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18CY_ECA_NOTTHREADED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_16KARRAYCLIENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21CY_ECA_16KARRAYCLIENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_CONNSEQTMO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17CY_ECA_CONNSEQTMO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNRESPTMO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16CY_ECA_UNRESPTMO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_NEVER_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ICAFE_CS_NEVER_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_PREV_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18ICAFE_CS_PREV_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_CS_CONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CLOSED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CS_CLOSED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_DISCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_DISCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_UNKNOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_CS_UNKNOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_TYPENOTCONN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_TYPENOTCONN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_RULE_FALSE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_RULE_FALSE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ICAFE_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CALLBACK_NOT_YET_INVOKED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_30ICAFE_CALLBACK_NOT_YET_INVOKED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_WAITING_FOR_PREV_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31ICAFE_WAITING_FOR_PREV_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CACHE_EMPTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_CACHE_EMPTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_38ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_MONITOR_DELAYED_AS_CONN_DOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ICAFE_MONITOR_DELAYED_AS_CONN_DOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_37ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_SET_AND_GET_MISMATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ICAFE_SET_AND_GET_MISMATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_GET(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_GET_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_PUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15ICAFE_CA_OP_PUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CREATE_CHANNEL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ICAFE_CA_OP_CREATE_CHANNEL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_ADD_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_ADD_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CLEAR_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ICAFE_CA_OP_CLEAR_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_OTHER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_CA_OP_OTHER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_DOWN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ICAFE_CA_OP_CONN_DOWN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_UP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ICAFE_CA_OP_CONN_UP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_RUN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_DAQ_RUN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_PAUSED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ICAFE_DAQ_PAUSED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_STOPPED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ICAFE_DAQ_STOPPED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ECAFE_LOAD_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_LOAD_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_NORMAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ICAFE_NORMAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ICAFE_SUCCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ICAFE_SUCCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NODATA(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ECAFE_NODATA_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_TYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18ECAFE_INVALID_TYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADSTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ECAFE_BADSTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BADTYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ECAFE_BADTYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NO_CONVERT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NO_CONVERT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCONTEXT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ECAFE_NULLCONTEXT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCHID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLCHID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLEVID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ECAFE_NULLEVID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24ECAFE_UNKNOWN_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_COLLECTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_EMPTY_COLLECTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_COLLECTION_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_INVALID_MEMBER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31ECAFE_COLLECTION_INVALID_MEMBER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_RULE_FALSE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_RULE_FALSE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_19ECAFE_UNKNOWN_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_GROUP(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17ECAFE_EMPTY_GROUP_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_GROUP_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20ECAFE_GROUP_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_HANDLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_20ECAFE_INVALID_HANDLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_GROUP_HANDLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ECAFE_INVALID_GROUP_HANDLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NORDACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NORDACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_NOWTACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16ECAFE_NOWTACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13ECAFE_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_CANNOT_OPEN_FILE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_CANNOT_OPEN_FILE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_SWITCH_CASE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_INVALID_SWITCH_CASE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_PREV_DEF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_PVALIAS_PREV_DEF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ECAFE_PVALIAS_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVNAME_PREV_DEF_AS_PVALIAS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_32ECAFE_PVNAME_PREV_DEF_AS_PVALIAS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_DEVICE_ATTRIB_NOT_FOUND(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_29ECAFE_DEVICE_ATTRIB_NOT_FOUND_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_HASH_UNIQUEID_EXISTS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26ECAFE_HASH_UNIQUEID_EXISTS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_WRONG_CA_CONTEXT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_22ECAFE_WRONG_CA_CONTEXT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_CAFENUM_POLICY_TYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_INVALID_CAFENUM_POLICY_TYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_36ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_ENUM_INDEX(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24ECAFE_INVALID_ENUM_INDEX_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_PVGROUP_GROUPHANDLE_MISMATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ECAFE_PVGROUP_GROUPHANDLE_MISMATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT_SET_AND_MATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27ECAFE_TIMEOUT_SET_AND_MATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_HANDLE_MISMATCH_SET_AND_MATCH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_35ECAFE_HANDLE_MISMATCH_SET_AND_MATCH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_INCONSISTENT_CONTAINER_CORRECTED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_38ECAFE_INCONSISTENT_CONTAINER_CORRECTED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BPM_DATA_IS_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BPM_DATA_IS_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_DECOMPRESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_DECOMPRESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_ALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_ALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_REALLOCMEM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25ECAFE_BITSHUFF_REALLOCMEM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_BADCOUNT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23ECAFE_BITSHUFF_BADCOUNT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_MULTIPART_MESS_NODATA(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_34ECAFE_BSREAD_MULTIPART_MESS_NODATA_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_MAINHEADER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_MAINHEADER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_DATAHEADER(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33ECAFE_BSREAD_PARSEFAIL_DATAHEADER_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_ZMQSTREAM_NULL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27ECAFE_BSREAD_ZMQSTREAM_NULL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EINTR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11ERRNO_EINTR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EAGAIN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EAGAIN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EFAULT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EFAULT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EINVAL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12ERRNO_EINVAL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_ENOTSOCK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14ERRNO_ENOTSOCK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_ERRNO_EPROTONOSUPPORT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21ERRNO_EPROTONOSUPPORT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_NO_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12SEV_NO_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_MINOR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9SEV_MINOR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_MAJOR(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9SEV_MAJOR_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_SEV_INVALID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11SEV_INVALID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_NO_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13STAT_NO_ALARM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_READ(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_READ_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_WRITE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10STAT_WRITE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HIHI(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_HIHI_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HIGH(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_HIGH_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LOLO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_LOLO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_LOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_STATE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10STAT_STATE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_COS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_COS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_COMM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_COMM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_TIMEOUT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_HWLIMIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_HWLIMIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_CALC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_CALC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SCAN(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SCAN_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_LINK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_LINK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SOFT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SOFT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_BAD_SUB(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_BAD_SUB_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_UDF(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8STAT_UDF_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_DISABLE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12STAT_DISABLE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_SIMM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9STAT_SIMM_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_READ_ACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16STAT_READ_ACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_STAT_WRITE_ACCESS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17STAT_WRITE_ACCESS_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITHOUT_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_16WITHOUT_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_DEFAULT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_21WITH_CALLBACK_DEFAULT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_USER_SUPPLIED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_27WITH_CALLBACK_USER_SUPPLIED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_FLUSH_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13WITH_FLUSH_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_PEND_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12WITH_PEND_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_PEND_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15WITH_PEND_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WITH_POLL(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9WITH_POLL_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AUTOMATIC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15FLUSH_AUTOMATIC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_NOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9FLUSH_NOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_CREATION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_33FLUSH_AFTER_EACH_CHANNEL_CREATION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_37FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24FLUSH_AFTER_EACH_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_GROUP_CREATION(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_31FLUSH_AFTER_EACH_GROUP_CREATION_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FLUSH_DESIGNATED_TO_CLIENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26FLUSH_DESIGNATED_TO_CLIENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_CHECK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_18GET_CACHE_NO_CHECK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_17GET_CACHE_NO_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NOW(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13GET_CACHE_NOW_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_CACHE_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14GET_CACHE_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_FROM_CACHE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14GET_FROM_CACHE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_GET_FROM_IOC(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12GET_FROM_IOC_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NATIVE_DATATYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15NATIVE_DATATYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_LOWEST_DATATYPE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_15LOWEST_DATATYPE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BLOCKING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8BLOCKING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_4WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NON_BLOCKING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12NON_BLOCKING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NO_WAIT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_7NO_WAIT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NO_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_10NO_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_PRE_REQUEST(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_11PRE_REQUEST_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_REQUEST(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12FROM_REQUEST_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_PEND(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_9FROM_PEND_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_CALLBACK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13FROM_CALLBACK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_FROM_MESSAGE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_12FROM_MESSAGE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_NOT_INITIATED(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_13NOT_INITIATED_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_PENDING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_7PENDING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_COMPLETE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_8COMPLETE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_EVENT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26DEFAULT_TIMEOUT_PEND_EVENT_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_IO(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_23DEFAULT_TIMEOUT_PEND_IO_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_STRING(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_26INVALID_ENUM_RETURN_STRING_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_25INVALID_ENUM_RETURN_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_HIGH_WATER_MARK(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_29BSREAD_ZEROMQ_HIGH_WATER_MARK_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_TIMEOUT_MS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_24BSREAD_ZEROMQ_TIMEOUT_MS_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCa[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_4CyCa_3__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_4CyCa_5__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCa[] = { + {(char *)"CY_DBE_VALUE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_VALUE, 0, (char *)0, 0}, + {(char *)"CY_DBE_LOG", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_LOG, 0, (char *)0, 0}, + {(char *)"CY_DBE_ARCHIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ARCHIVE, 0, (char *)0, 0}, + {(char *)"CY_DBE_ALARM", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ALARM, 0, (char *)0, 0}, + {(char *)"CY_DBE_PROPERTY", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_PROPERTY, 0, (char *)0, 0}, + {(char *)"CY_DBR_PRIMITIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PRIMITIVE, 0, (char *)0, 0}, + {(char *)"CY_DBR_PLAIN", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PLAIN, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL, 0, (char *)0, 0}, + {(char *)"CY_DBR_PUT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PUT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STSACK", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STSACK, 0, (char *)0, 0}, + {(char *)"CY_DBR_CLASS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CLASS, 0, (char *)0, 0}, + {(char *)"CY_DBR_NONE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_NONE, 0, (char *)0, 0}, + {(char *)"CY_DBR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_STS_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_TIME_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_GR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_STRING, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_SHORT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_INT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_FLOAT, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_ENUM, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_CHAR, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_LONG, 0, (char *)0, 0}, + {(char *)"CY_DBR_CTRL_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_DOUBLE, 0, (char *)0, 0}, + {(char *)"CY_ECA_NORMAL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORMAL, 0, (char *)0, 0}, + {(char *)"CY_ECA_ALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ALLOCMEM, 0, (char *)0, 0}, + {(char *)"CY_ECA_TOLARGE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_TOLARGE, 0, (char *)0, 0}, + {(char *)"CY_ECA_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_TIMEOUT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADTYPE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADTYPE, 0, (char *)0, 0}, + {(char *)"CY_ECA_INTERNAL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_INTERNAL, 0, (char *)0, 0}, + {(char *)"CY_ECA_GETFAIL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_GETFAIL, 0, (char *)0, 0}, + {(char *)"CY_ECA_PUTFAIL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTFAIL, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCOUNT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADSTR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSTR, 0, (char *)0, 0}, + {(char *)"CY_ECA_DISCONN", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_DISCONN, 0, (char *)0, 0}, + {(char *)"CY_ECA_DBLCHNL", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_DBLCHNL, 0, (char *)0, 0}, + {(char *)"CY_ECA_EVDISALLOW", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_EVDISALLOW, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADMONID", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMONID, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADMASK", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADMASK, 0, (char *)0, 0}, + {(char *)"CY_ECA_IODONE", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_IODONE, 0, (char *)0, 0}, + {(char *)"CY_ECA_IOINPROGRESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_IOINPROGRESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADSYNCGRP", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADSYNCGRP, 0, (char *)0, 0}, + {(char *)"CY_ECA_PUTCBINPROG", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_PUTCBINPROG, 0, (char *)0, 0}, + {(char *)"CY_ECA_NORDACCESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NORDACCESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOWTACCESS", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOWTACCESS, 0, (char *)0, 0}, + {(char *)"CY_ECA_ANACHRONISM", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ANACHRONISM, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOSEARCHADDR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOSEARCHADDR, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOCONVERT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOCONVERT, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADCHID", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADCHID, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADFUNCPTR", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADFUNCPTR, 0, (char *)0, 0}, + {(char *)"CY_ECA_ISATTACHED", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_ISATTACHED, 0, (char *)0, 0}, + {(char *)"CY_ECA_UNAVAILINSERV", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNAVAILINSERV, 0, (char *)0, 0}, + {(char *)"CY_ECA_CHANDESTROY", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_CHANDESTROY, 0, (char *)0, 0}, + {(char *)"CY_ECA_BADPRIORITY", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_BADPRIORITY, 0, (char *)0, 0}, + {(char *)"CY_ECA_NOTTHREADED", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_NOTTHREADED, 0, (char *)0, 0}, + {(char *)"CY_ECA_16KARRAYCLIENT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_16KARRAYCLIENT, 0, (char *)0, 0}, + {(char *)"CY_ECA_CONNSEQTMO", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_CONNSEQTMO, 0, (char *)0, 0}, + {(char *)"CY_ECA_UNRESPTMO", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_UNRESPTMO, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_NEVER_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_NEVER_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_PREV_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_PREV_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_CLOSED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CLOSED, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_DISCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_DISCONN, 0, (char *)0, 0}, + {(char *)"ICAFE_CS_UNKNOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_UNKNOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_TYPENOTCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_TYPENOTCONN, 0, (char *)0, 0}, + {(char *)"ICAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_RULE_FALSE, 0, (char *)0, 0}, + {(char *)"ICAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ICAFE_CALLBACK_NOT_YET_INVOKED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CALLBACK_NOT_YET_INVOKED, 0, (char *)0, 0}, + {(char *)"ICAFE_WAITING_FOR_PREV_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_ICAFE_WAITING_FOR_PREV_CALLBACK, 0, (char *)0, 0}, + {(char *)"ICAFE_CACHE_EMPTY", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CACHE_EMPTY, 0, (char *)0, 0}, + {(char *)"ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, 0, (char *)0, 0}, + {(char *)"ICAFE_MONITOR_DELAYED_AS_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, 0, (char *)0, 0}, + {(char *)"ICAFE_SET_AND_GET_MISMATCH", __pyx_getprop_6PyCafe_4CyCa_ICAFE_SET_AND_GET_MISMATCH, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_GET", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_GET, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_PUT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_PUT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CREATE_CHANNEL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CREATE_CHANNEL, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_ADD_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_ADD_EVENT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CLEAR_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CLEAR_EVENT, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_OTHER", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_OTHER, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_DOWN, 0, (char *)0, 0}, + {(char *)"ICAFE_CA_OP_CONN_UP", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_UP, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_RUN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_RUN, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_PAUSED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_PAUSED, 0, (char *)0, 0}, + {(char *)"ICAFE_DAQ_STOPPED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_DAQ_STOPPED, 0, (char *)0, 0}, + {(char *)"ECAFE_LOAD_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_LOAD_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_GROUP, 0, (char *)0, 0}, + {(char *)"ICAFE_NORMAL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_NORMAL, 0, (char *)0, 0}, + {(char *)"ICAFE_SUCCESS", __pyx_getprop_6PyCafe_4CyCa_ICAFE_SUCCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_NODATA", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NODATA, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_TYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ECAFE_BADSTR", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADSTR, 0, (char *)0, 0}, + {(char *)"ECAFE_BADTYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADTYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_NO_CONVERT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NO_CONVERT, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLCONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCONTEXT, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLCHID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCHID, 0, (char *)0, 0}, + {(char *)"ECAFE_NULLEVID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLEVID, 0, (char *)0, 0}, + {(char *)"ECAFE_UNKNOWN_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_EMPTY_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_COLLECTION, 0, (char *)0, 0}, + {(char *)"ECAFE_COLLECTION_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_COLLECTION_INVALID_MEMBER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_INVALID_MEMBER, 0, (char *)0, 0}, + {(char *)"ECAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_RULE_FALSE, 0, (char *)0, 0}, + {(char *)"ECAFE_UNKNOWN_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_GROUP, 0, (char *)0, 0}, + {(char *)"ECAFE_EMPTY_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_GROUP, 0, (char *)0, 0}, + {(char *)"ECAFE_GROUP_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_GROUP_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_HANDLE, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_GROUP_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_GROUP_HANDLE, 0, (char *)0, 0}, + {(char *)"ECAFE_NORDACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NORDACCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_NOWTACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NOWTACCESS, 0, (char *)0, 0}, + {(char *)"ECAFE_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT, 0, (char *)0, 0}, + {(char *)"ECAFE_CANNOT_OPEN_FILE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_CANNOT_OPEN_FILE, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_SWITCH_CASE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_SWITCH_CASE, 0, (char *)0, 0}, + {(char *)"ECAFE_PVALIAS_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_PREV_DEF, 0, (char *)0, 0}, + {(char *)"ECAFE_PVALIAS_INVALID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_INVALID, 0, (char *)0, 0}, + {(char *)"ECAFE_PVNAME_PREV_DEF_AS_PVALIAS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVNAME_PREV_DEF_AS_PVALIAS, 0, (char *)0, 0}, + {(char *)"ECAFE_DEVICE_ATTRIB_NOT_FOUND", __pyx_getprop_6PyCafe_4CyCa_ECAFE_DEVICE_ATTRIB_NOT_FOUND, 0, (char *)0, 0}, + {(char *)"ECAFE_HASH_UNIQUEID_EXISTS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HASH_UNIQUEID_EXISTS, 0, (char *)0, 0}, + {(char *)"ECAFE_WRONG_CA_CONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_WRONG_CA_CONTEXT, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_CAFENUM_POLICY_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_CAFENUM_POLICY_TYPE, 0, (char *)0, 0}, + {(char *)"ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED", __pyx_getprop_6PyCafe_4CyCa_ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, 0, (char *)0, 0}, + {(char *)"ECAFE_INVALID_ENUM_INDEX", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_ENUM_INDEX, 0, (char *)0, 0}, + {(char *)"ECAFE_PVGROUP_GROUPHANDLE_MISMATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_TIMEOUT_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT_SET_AND_MATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_HANDLE_MISMATCH_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, 0, (char *)0, 0}, + {(char *)"ECAFE_INCONSISTENT_CONTAINER_CORRECTED", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INCONSISTENT_CONTAINER_CORRECTED, 0, (char *)0, 0}, + {(char *)"ECAFE_BPM_DATA_IS_INVALID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BPM_DATA_IS_INVALID, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_DECOMPRESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_DECOMPRESS, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_ALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_ALLOCMEM, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_REALLOCMEM", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_REALLOCMEM, 0, (char *)0, 0}, + {(char *)"ECAFE_BITSHUFF_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BITSHUFF_BADCOUNT, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_MULTIPART_MESS_NODATA", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_MULTIPART_MESS_NODATA, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_PARSEFAIL_MAINHEADER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_MAINHEADER, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_PARSEFAIL_DATAHEADER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_PARSEFAIL_DATAHEADER, 0, (char *)0, 0}, + {(char *)"ECAFE_BSREAD_ZMQSTREAM_NULL", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BSREAD_ZMQSTREAM_NULL, 0, (char *)0, 0}, + {(char *)"ERRNO_EINTR", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EINTR, 0, (char *)0, 0}, + {(char *)"ERRNO_EAGAIN", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EAGAIN, 0, (char *)0, 0}, + {(char *)"ERRNO_EFAULT", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EFAULT, 0, (char *)0, 0}, + {(char *)"ERRNO_EINVAL", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EINVAL, 0, (char *)0, 0}, + {(char *)"ERRNO_ENOTSOCK", __pyx_getprop_6PyCafe_4CyCa_ERRNO_ENOTSOCK, 0, (char *)0, 0}, + {(char *)"ERRNO_EPROTONOSUPPORT", __pyx_getprop_6PyCafe_4CyCa_ERRNO_EPROTONOSUPPORT, 0, (char *)0, 0}, + {(char *)"SEV_NO_ALARM", __pyx_getprop_6PyCafe_4CyCa_SEV_NO_ALARM, 0, (char *)0, 0}, + {(char *)"SEV_MINOR", __pyx_getprop_6PyCafe_4CyCa_SEV_MINOR, 0, (char *)0, 0}, + {(char *)"SEV_MAJOR", __pyx_getprop_6PyCafe_4CyCa_SEV_MAJOR, 0, (char *)0, 0}, + {(char *)"SEV_INVALID", __pyx_getprop_6PyCafe_4CyCa_SEV_INVALID, 0, (char *)0, 0}, + {(char *)"STAT_NO_ALARM", __pyx_getprop_6PyCafe_4CyCa_STAT_NO_ALARM, 0, (char *)0, 0}, + {(char *)"STAT_READ", __pyx_getprop_6PyCafe_4CyCa_STAT_READ, 0, (char *)0, 0}, + {(char *)"STAT_WRITE", __pyx_getprop_6PyCafe_4CyCa_STAT_WRITE, 0, (char *)0, 0}, + {(char *)"STAT_HIHI", __pyx_getprop_6PyCafe_4CyCa_STAT_HIHI, 0, (char *)0, 0}, + {(char *)"STAT_HIGH", __pyx_getprop_6PyCafe_4CyCa_STAT_HIGH, 0, (char *)0, 0}, + {(char *)"STAT_LOLO", __pyx_getprop_6PyCafe_4CyCa_STAT_LOLO, 0, (char *)0, 0}, + {(char *)"STAT_LOW", __pyx_getprop_6PyCafe_4CyCa_STAT_LOW, 0, (char *)0, 0}, + {(char *)"STAT_STATE", __pyx_getprop_6PyCafe_4CyCa_STAT_STATE, 0, (char *)0, 0}, + {(char *)"STAT_COS", __pyx_getprop_6PyCafe_4CyCa_STAT_COS, 0, (char *)0, 0}, + {(char *)"STAT_COMM", __pyx_getprop_6PyCafe_4CyCa_STAT_COMM, 0, (char *)0, 0}, + {(char *)"STAT_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_STAT_TIMEOUT, 0, (char *)0, 0}, + {(char *)"STAT_HWLIMIT", __pyx_getprop_6PyCafe_4CyCa_STAT_HWLIMIT, 0, (char *)0, 0}, + {(char *)"STAT_CALC", __pyx_getprop_6PyCafe_4CyCa_STAT_CALC, 0, (char *)0, 0}, + {(char *)"STAT_SCAN", __pyx_getprop_6PyCafe_4CyCa_STAT_SCAN, 0, (char *)0, 0}, + {(char *)"STAT_LINK", __pyx_getprop_6PyCafe_4CyCa_STAT_LINK, 0, (char *)0, 0}, + {(char *)"STAT_SOFT", __pyx_getprop_6PyCafe_4CyCa_STAT_SOFT, 0, (char *)0, 0}, + {(char *)"STAT_BAD_SUB", __pyx_getprop_6PyCafe_4CyCa_STAT_BAD_SUB, 0, (char *)0, 0}, + {(char *)"STAT_UDF", __pyx_getprop_6PyCafe_4CyCa_STAT_UDF, 0, (char *)0, 0}, + {(char *)"STAT_DISABLE", __pyx_getprop_6PyCafe_4CyCa_STAT_DISABLE, 0, (char *)0, 0}, + {(char *)"STAT_SIMM", __pyx_getprop_6PyCafe_4CyCa_STAT_SIMM, 0, (char *)0, 0}, + {(char *)"STAT_READ_ACCESS", __pyx_getprop_6PyCafe_4CyCa_STAT_READ_ACCESS, 0, (char *)0, 0}, + {(char *)"STAT_WRITE_ACCESS", __pyx_getprop_6PyCafe_4CyCa_STAT_WRITE_ACCESS, 0, (char *)0, 0}, + {(char *)"WITHOUT_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_WITHOUT_CALLBACK, 0, (char *)0, 0}, + {(char *)"WITH_CALLBACK_DEFAULT", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_DEFAULT, 0, (char *)0, 0}, + {(char *)"WITH_CALLBACK_USER_SUPPLIED", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_USER_SUPPLIED, 0, (char *)0, 0}, + {(char *)"WITH_FLUSH_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_FLUSH_IO, 0, (char *)0, 0}, + {(char *)"WITH_PEND_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_IO, 0, (char *)0, 0}, + {(char *)"WITH_PEND_EVENT", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_EVENT, 0, (char *)0, 0}, + {(char *)"WITH_POLL", __pyx_getprop_6PyCafe_4CyCa_WITH_POLL, 0, (char *)0, 0}, + {(char *)"FLUSH_AUTOMATIC", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AUTOMATIC, 0, (char *)0, 0}, + {(char *)"FLUSH_NOW", __pyx_getprop_6PyCafe_4CyCa_FLUSH_NOW, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_CREATION, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_MESSAGE, 0, (char *)0, 0}, + {(char *)"FLUSH_AFTER_EACH_GROUP_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_GROUP_CREATION, 0, (char *)0, 0}, + {(char *)"FLUSH_DESIGNATED_TO_CLIENT", __pyx_getprop_6PyCafe_4CyCa_FLUSH_DESIGNATED_TO_CLIENT, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NO_CHECK", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_CHECK, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_WAIT, 0, (char *)0, 0}, + {(char *)"GET_CACHE_NOW", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NOW, 0, (char *)0, 0}, + {(char *)"GET_CACHE_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_WAIT, 0, (char *)0, 0}, + {(char *)"GET_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_CACHE, 0, (char *)0, 0}, + {(char *)"GET_FROM_IOC", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_IOC, 0, (char *)0, 0}, + {(char *)"NATIVE_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_NATIVE_DATATYPE, 0, (char *)0, 0}, + {(char *)"LOWEST_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_LOWEST_DATATYPE, 0, (char *)0, 0}, + {(char *)"BLOCKING", __pyx_getprop_6PyCafe_4CyCa_BLOCKING, 0, (char *)0, 0}, + {(char *)"WAIT", __pyx_getprop_6PyCafe_4CyCa_WAIT, 0, (char *)0, 0}, + {(char *)"NON_BLOCKING", __pyx_getprop_6PyCafe_4CyCa_NON_BLOCKING, 0, (char *)0, 0}, + {(char *)"NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_NO_WAIT, 0, (char *)0, 0}, + {(char *)"NO_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_NO_MESSAGE, 0, (char *)0, 0}, + {(char *)"PRE_REQUEST", __pyx_getprop_6PyCafe_4CyCa_PRE_REQUEST, 0, (char *)0, 0}, + {(char *)"FROM_REQUEST", __pyx_getprop_6PyCafe_4CyCa_FROM_REQUEST, 0, (char *)0, 0}, + {(char *)"FROM_PEND", __pyx_getprop_6PyCafe_4CyCa_FROM_PEND, 0, (char *)0, 0}, + {(char *)"FROM_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_FROM_CALLBACK, 0, (char *)0, 0}, + {(char *)"FROM_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FROM_MESSAGE, 0, (char *)0, 0}, + {(char *)"NOT_INITIATED", __pyx_getprop_6PyCafe_4CyCa_NOT_INITIATED, 0, (char *)0, 0}, + {(char *)"PENDING", __pyx_getprop_6PyCafe_4CyCa_PENDING, 0, (char *)0, 0}, + {(char *)"COMPLETE", __pyx_getprop_6PyCafe_4CyCa_COMPLETE, 0, (char *)0, 0}, + {(char *)"DEFAULT_TIMEOUT_PEND_EVENT", __pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_EVENT, 0, (char *)0, 0}, + {(char *)"DEFAULT_TIMEOUT_PEND_IO", __pyx_getprop_6PyCafe_4CyCa_DEFAULT_TIMEOUT_PEND_IO, 0, (char *)0, 0}, + {(char *)"INVALID_ENUM_RETURN_STRING", __pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_STRING, 0, (char *)0, 0}, + {(char *)"INVALID_ENUM_RETURN_VALUE", __pyx_getprop_6PyCafe_4CyCa_INVALID_ENUM_RETURN_VALUE, 0, (char *)0, 0}, + {(char *)"BSREAD_ZEROMQ_HIGH_WATER_MARK", __pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_HIGH_WATER_MARK, 0, (char *)0, 0}, + {(char *)"BSREAD_ZEROMQ_TIMEOUT_MS", __pyx_getprop_6PyCafe_4CyCa_BSREAD_ZEROMQ_TIMEOUT_MS, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CyCa = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CyCa", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CyCa), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CyCa, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CyCa, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CyCa, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CyCa, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_channelInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_channelInfo *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_channelInfo *)o); + new((void*)&(p->hostName)) std::string(); + new((void*)&(p->dataTypeAsString)) std::string(); + new((void*)&(p->className)) std::string(); + new((void*)&(p->connectionStateAsString)) std::string(); + new((void*)&(p->cafeConnectionStateAsString)) std::string(); + new((void*)&(p->cdt)) CAFEDataTypeCode(); + new((void*)&(p->csc)) CAFEStatusCode(); + new((void*)&(p->caop)) CAOPCodes(); + if (unlikely(__pyx_pw_6PyCafe_11channelInfo_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_channelInfo(PyObject *o) { + struct __pyx_obj_6PyCafe_channelInfo *p = (struct __pyx_obj_6PyCafe_channelInfo *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + __Pyx_call_destructor(p->hostName); + __Pyx_call_destructor(p->dataTypeAsString); + __Pyx_call_destructor(p->className); + __Pyx_call_destructor(p->connectionStateAsString); + __Pyx_call_destructor(p->cafeConnectionStateAsString); + __Pyx_call_destructor(p->cdt); + __Pyx_call_destructor(p->csc); + __Pyx_call_destructor(p->caop); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_channelID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_9channelID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectFlag(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_11connectFlag_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_hostName(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_8hostName_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_dataTypeAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_16dataTypeAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_accessRead(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_10accessRead_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_accessWrite(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_11accessWrite_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_className(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_9className_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectionState(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_15connectionState_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_cafeConnectionState(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_19cafeConnectionState_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_connectionStateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_23connectionStateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_11channelInfo_cafeConnectionStateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_11channelInfo_27cafeConnectionStateAsString_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_channelInfo[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_3show, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_11channelInfo_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_channelInfo[] = { + {(char *)"channelID", __pyx_getprop_6PyCafe_11channelInfo_channelID, 0, (char *)0, 0}, + {(char *)"connectFlag", __pyx_getprop_6PyCafe_11channelInfo_connectFlag, 0, (char *)0, 0}, + {(char *)"hostName", __pyx_getprop_6PyCafe_11channelInfo_hostName, 0, (char *)0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_11channelInfo_nelem, 0, (char *)0, 0}, + {(char *)"dataType", __pyx_getprop_6PyCafe_11channelInfo_dataType, 0, (char *)0, 0}, + {(char *)"dataTypeAsString", __pyx_getprop_6PyCafe_11channelInfo_dataTypeAsString, 0, (char *)0, 0}, + {(char *)"accessRead", __pyx_getprop_6PyCafe_11channelInfo_accessRead, 0, (char *)0, 0}, + {(char *)"accessWrite", __pyx_getprop_6PyCafe_11channelInfo_accessWrite, 0, (char *)0, 0}, + {(char *)"className", __pyx_getprop_6PyCafe_11channelInfo_className, 0, (char *)0, 0}, + {(char *)"connectionState", __pyx_getprop_6PyCafe_11channelInfo_connectionState, 0, (char *)0, 0}, + {(char *)"cafeConnectionState", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionState, 0, (char *)0, 0}, + {(char *)"connectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_connectionStateAsString, 0, (char *)0, 0}, + {(char *)"cafeConnectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionStateAsString, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_channelInfo = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.channelInfo", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_channelInfo), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_channelInfo, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_channelInfo, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_channelInfo, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_channelInfo, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvctrl __pyx_vtable_6PyCafe_pvctrl; + +static PyObject *__pyx_tp_new_6PyCafe_pvctrl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvctrl *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvctrl *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvctrl; + p->units = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->enumStrings = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->upperDisplayLimit = Py_None; Py_INCREF(Py_None); + p->lowerDisplayLimit = Py_None; Py_INCREF(Py_None); + p->upperAlarmLimit = Py_None; Py_INCREF(Py_None); + p->upperWarningLimit = Py_None; Py_INCREF(Py_None); + p->lowerWarningLimit = Py_None; Py_INCREF(Py_None); + p->lowerAlarmLimit = Py_None; Py_INCREF(Py_None); + p->upperControlLimit = Py_None; Py_INCREF(Py_None); + p->lowerControlLimit = Py_None; Py_INCREF(Py_None); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvctrl_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvctrl(PyObject *o) { + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->units); + Py_CLEAR(p->enumStrings); + Py_CLEAR(p->upperDisplayLimit); + Py_CLEAR(p->lowerDisplayLimit); + Py_CLEAR(p->upperAlarmLimit); + Py_CLEAR(p->upperWarningLimit); + Py_CLEAR(p->lowerWarningLimit); + Py_CLEAR(p->lowerAlarmLimit); + Py_CLEAR(p->upperControlLimit); + Py_CLEAR(p->lowerControlLimit); + Py_CLEAR(p->value); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvctrl(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + if (p->enumStrings) { + e = (*v)(p->enumStrings, a); if (e) return e; + } + if (p->upperDisplayLimit) { + e = (*v)(p->upperDisplayLimit, a); if (e) return e; + } + if (p->lowerDisplayLimit) { + e = (*v)(p->lowerDisplayLimit, a); if (e) return e; + } + if (p->upperAlarmLimit) { + e = (*v)(p->upperAlarmLimit, a); if (e) return e; + } + if (p->upperWarningLimit) { + e = (*v)(p->upperWarningLimit, a); if (e) return e; + } + if (p->lowerWarningLimit) { + e = (*v)(p->lowerWarningLimit, a); if (e) return e; + } + if (p->lowerAlarmLimit) { + e = (*v)(p->lowerAlarmLimit, a); if (e) return e; + } + if (p->upperControlLimit) { + e = (*v)(p->upperControlLimit, a); if (e) return e; + } + if (p->lowerControlLimit) { + e = (*v)(p->lowerControlLimit, a); if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvctrl(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + tmp = ((PyObject*)p->enumStrings); + p->enumStrings = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperDisplayLimit); + p->upperDisplayLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerDisplayLimit); + p->lowerDisplayLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperAlarmLimit); + p->upperAlarmLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperWarningLimit); + p->upperWarningLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerWarningLimit); + p->lowerWarningLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerAlarmLimit); + p->lowerAlarmLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->upperControlLimit); + p->upperControlLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->lowerControlLimit); + p->lowerControlLimit = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->value); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_alarmStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_11alarmStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_alarmSeverity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_13alarmSeverity_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_precision(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_9precision_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_units(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5units_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_noEnumStrings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_13noEnumStrings_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_enumStrings(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_11enumStrings_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperDisplayLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperDisplayLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerDisplayLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerDisplayLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperAlarmLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_15upperAlarmLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperWarningLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperWarningLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerWarningLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerWarningLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerAlarmLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_15lowerAlarmLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_upperControlLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17upperControlLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_lowerControlLimit(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_17lowerControlLimit_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_5value_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvctrl_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_6status_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_pvctrl[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_3show, METH_NOARGS, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_5showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvctrl_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvctrl[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvctrl_nelem, 0, (char *)0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvctrl_alarmStatus, 0, (char *)0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvctrl_alarmSeverity, 0, (char *)0, 0}, + {(char *)"precision", __pyx_getprop_6PyCafe_6pvctrl_precision, 0, (char *)0, 0}, + {(char *)"units", __pyx_getprop_6PyCafe_6pvctrl_units, 0, (char *)0, 0}, + {(char *)"noEnumStrings", __pyx_getprop_6PyCafe_6pvctrl_noEnumStrings, 0, (char *)0, 0}, + {(char *)"enumStrings", __pyx_getprop_6PyCafe_6pvctrl_enumStrings, 0, (char *)0, 0}, + {(char *)"upperDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_upperDisplayLimit, 0, (char *)0, 0}, + {(char *)"lowerDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerDisplayLimit, 0, (char *)0, 0}, + {(char *)"upperAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_upperAlarmLimit, 0, (char *)0, 0}, + {(char *)"upperWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_upperWarningLimit, 0, (char *)0, 0}, + {(char *)"lowerWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerWarningLimit, 0, (char *)0, 0}, + {(char *)"lowerAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerAlarmLimit, 0, (char *)0, 0}, + {(char *)"upperControlLimit", __pyx_getprop_6PyCafe_6pvctrl_upperControlLimit, 0, (char *)0, 0}, + {(char *)"lowerControlLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerControlLimit, 0, (char *)0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvctrl_value, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvctrl_status, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvctrl = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvctrl", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvctrl), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvctrl, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvctrl, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvctrl, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvctrl, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvctrl, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvctrl, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_CafeException(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6PyCafe_CafeException *p; + PyObject *o = (&((PyTypeObject*)PyExc_Exception)[0])->tp_new(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CafeException *)o); + p->type = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->source = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->error_text = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->error_info = ((PyObject*)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_CafeException(PyObject *o) { + struct __pyx_obj_6PyCafe_CafeException *p = (struct __pyx_obj_6PyCafe_CafeException *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->type); + Py_CLEAR(p->source); + Py_CLEAR(p->name); + Py_CLEAR(p->error_text); + Py_CLEAR(p->error_info); + PyObject_GC_Track(o); + (&((PyTypeObject*)PyExc_Exception)[0])->tp_dealloc(o); +} + +static int __pyx_tp_traverse_6PyCafe_CafeException(PyObject *o, visitproc v, void *a) { + int e; + if (!(&((PyTypeObject*)PyExc_Exception)[0])->tp_traverse); else { e = (&((PyTypeObject*)PyExc_Exception)[0])->tp_traverse(o,v,a); if (e) return e; } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_CafeException(PyObject *o) { + if (!(&((PyTypeObject*)PyExc_Exception)[0])->tp_clear); else (&((PyTypeObject*)PyExc_Exception)[0])->tp_clear(o); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_4type_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_source(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_6source_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_6handle_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_4name_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_code(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_code_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_text(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_text_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13CafeException_error_info(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13CafeException_10error_info_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_CafeException[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_3show, METH_NOARGS, 0}, + {"reveal", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_5reveal, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_13CafeException_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CafeException[] = { + {(char *)"type", __pyx_getprop_6PyCafe_13CafeException_type, 0, (char *)0, 0}, + {(char *)"source", __pyx_getprop_6PyCafe_13CafeException_source, 0, (char *)0, 0}, + {(char *)"handle", __pyx_getprop_6PyCafe_13CafeException_handle, 0, (char *)0, 0}, + {(char *)"name", __pyx_getprop_6PyCafe_13CafeException_name, 0, (char *)0, 0}, + {(char *)"error_code", __pyx_getprop_6PyCafe_13CafeException_error_code, 0, (char *)0, 0}, + {(char *)"error_text", __pyx_getprop_6PyCafe_13CafeException_error_text, 0, (char *)0, 0}, + {(char *)"error_info", __pyx_getprop_6PyCafe_13CafeException_error_info, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CafeException = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CafeException", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CafeException), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CafeException, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_CafeException, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_CafeException, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CafeException, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CafeException, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_6PyCafe_13CafeException_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CafeException, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_6PyCafe_monitorpolicy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_6PyCafe_13monitorpolicy_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_monitorpolicy(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_dbrDataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_11dbrDataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_cafeDbrType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_11cafeDbrType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_mask(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_4mask_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_userArgs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_8userArgs_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_6status_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_monid(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_5monid_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_PROPERTY(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_19maskHasDBE_PROPERTY_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_VALUE(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_VALUE_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_LOG(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_14maskHasDBE_LOG_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_ALARM(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_13monitorpolicy_16maskHasDBE_ALARM_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_monitorpolicy[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_3show, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_13monitorpolicy_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_monitorpolicy[] = { + {(char *)"dataType", __pyx_getprop_6PyCafe_13monitorpolicy_dataType, 0, (char *)0, 0}, + {(char *)"dbrDataType", __pyx_getprop_6PyCafe_13monitorpolicy_dbrDataType, 0, (char *)0, 0}, + {(char *)"cafeDbrType", __pyx_getprop_6PyCafe_13monitorpolicy_cafeDbrType, 0, (char *)0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_13monitorpolicy_nelem, 0, (char *)0, 0}, + {(char *)"mask", __pyx_getprop_6PyCafe_13monitorpolicy_mask, 0, (char *)0, 0}, + {(char *)"userArgs", __pyx_getprop_6PyCafe_13monitorpolicy_userArgs, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_13monitorpolicy_status, 0, (char *)0, 0}, + {(char *)"monid", __pyx_getprop_6PyCafe_13monitorpolicy_monid, 0, (char *)0, 0}, + {(char *)"maskHasDBE_PROPERTY", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_PROPERTY, 0, (char *)0, 0}, + {(char *)"maskHasDBE_VALUE", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_VALUE, 0, (char *)0, 0}, + {(char *)"maskHasDBE_LOG", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_LOG, 0, (char *)0, 0}, + {(char *)"maskHasDBE_ALARM", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_ALARM, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_monitorpolicy = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.monitorpolicy", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_monitorpolicy), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_monitorpolicy, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_monitorpolicy, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_monitorpolicy, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_monitorpolicy, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvdata __pyx_vtable_6PyCafe_pvdata; + +static PyObject *__pyx_tp_new_6PyCafe_pvdata(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvdata *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvdata *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvdata; + p->alarmStatusAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->alarmSeverityAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->ts = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->tsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->tsDateAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->bsDateAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->statusAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->dataTypeAsString = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvdata_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvdata(PyObject *o) { + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->alarmStatusAsString); + Py_CLEAR(p->alarmSeverityAsString); + Py_CLEAR(p->ts); + Py_CLEAR(p->tsDate); + Py_CLEAR(p->tsDateAsString); + Py_CLEAR(p->bsDateAsString); + Py_CLEAR(p->value); + Py_CLEAR(p->statusAsString); + Py_CLEAR(p->dataTypeAsString); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvdata(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + if (p->ts) { + e = (*v)(p->ts, a); if (e) return e; + } + if (p->tsDate) { + e = (*v)(p->tsDate, a); if (e) return e; + } + if (p->value) { + e = (*v)(p->value, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvdata(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + tmp = ((PyObject*)p->ts); + p->ts = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->tsDate); + p->tsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->value); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_nelem(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_5nelem_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_11alarmStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmSeverity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_13alarmSeverity_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmStatusAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_19alarmStatusAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_alarmSeverityAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_21alarmSeverityAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_ts(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_2ts_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_tsDate(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_6tsDate_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_tsDateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14tsDateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_bsDateAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14bsDateAsString_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_value(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_5value_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_6status_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6pvdata_status(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6pvdata_6status_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_statusAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6pvdata_statusAsString(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_3__set__(o, v); + } + else { + return __pyx_pw_6PyCafe_6pvdata_14statusAsString_5__del__(o); + } +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_pulseID(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_7pulseID_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_dataType(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_8dataType_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6pvdata_dataTypeAsString(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_16dataTypeAsString_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_pvdata[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_3show, METH_NOARGS, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_5showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_7__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6pvdata_9__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvdata[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvdata_nelem, 0, (char *)0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvdata_alarmStatus, 0, (char *)0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvdata_alarmSeverity, 0, (char *)0, 0}, + {(char *)"alarmStatusAsString", __pyx_getprop_6PyCafe_6pvdata_alarmStatusAsString, 0, (char *)0, 0}, + {(char *)"alarmSeverityAsString", __pyx_getprop_6PyCafe_6pvdata_alarmSeverityAsString, 0, (char *)0, 0}, + {(char *)"ts", __pyx_getprop_6PyCafe_6pvdata_ts, 0, (char *)0, 0}, + {(char *)"tsDate", __pyx_getprop_6PyCafe_6pvdata_tsDate, 0, (char *)0, 0}, + {(char *)"tsDateAsString", __pyx_getprop_6PyCafe_6pvdata_tsDateAsString, 0, (char *)0, 0}, + {(char *)"bsDateAsString", __pyx_getprop_6PyCafe_6pvdata_bsDateAsString, 0, (char *)0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvdata_value, 0, (char *)0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvdata_status, __pyx_setprop_6PyCafe_6pvdata_status, (char *)0, 0}, + {(char *)"statusAsString", __pyx_getprop_6PyCafe_6pvdata_statusAsString, __pyx_setprop_6PyCafe_6pvdata_statusAsString, (char *)0, 0}, + {(char *)"pulseID", __pyx_getprop_6PyCafe_6pvdata_pulseID, 0, (char *)0, 0}, + {(char *)"dataType", __pyx_getprop_6PyCafe_6pvdata_dataType, 0, (char *)0, 0}, + {(char *)"dataTypeAsString", __pyx_getprop_6PyCafe_6pvdata_dataTypeAsString, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvdata = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvdata", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvdata), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvdata, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvdata, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvdata, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvdata, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvdata, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvdata, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_pvgroup __pyx_vtable_6PyCafe_pvgroup; + +static PyObject *__pyx_tp_new_6PyCafe_pvgroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_pvgroup *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_pvgroup *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_pvgroup; + new((void*)&(p->name)) std::string(); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_7pvgroup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_pvgroup(PyObject *o) { + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + __Pyx_call_destructor(p->name); + Py_CLEAR(p->pvdata); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_pvgroup(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + if (p->pvdata) { + e = (*v)(p->pvdata, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_pvgroup(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + tmp = ((PyObject*)p->pvdata); + p->pvdata = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_pvdata(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_pvdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_3__set__(o, v); + } + else { + return __pyx_pw_6PyCafe_7pvgroup_6pvdata_5__del__(o); + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_npv(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_3npv_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_npv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_3npv_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_4name_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_4name_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_groupStatus(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_11groupStatus_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_groupHandle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_11groupHandle_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_groupHandle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_11groupHandle_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_rule(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_4rule_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_rule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_4rule_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_hasAlarm(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_hasAlarm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_8hasAlarm_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6PyCafe_7pvgroup_hasTS(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_7pvgroup_5hasTS_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_7pvgroup_hasTS(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_7pvgroup_5hasTS_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_6PyCafe_pvgroup[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_3show, METH_NOARGS, 0}, + {"showWithPV", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_5showWithPV, METH_O, 0}, + {"showMax", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_7showMax, METH_O, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_9__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_7pvgroup_11__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvgroup[] = { + {(char *)"pvdata", __pyx_getprop_6PyCafe_7pvgroup_pvdata, __pyx_setprop_6PyCafe_7pvgroup_pvdata, (char *)0, 0}, + {(char *)"npv", __pyx_getprop_6PyCafe_7pvgroup_npv, __pyx_setprop_6PyCafe_7pvgroup_npv, (char *)0, 0}, + {(char *)"name", __pyx_getprop_6PyCafe_7pvgroup_name, __pyx_setprop_6PyCafe_7pvgroup_name, (char *)0, 0}, + {(char *)"groupStatus", __pyx_getprop_6PyCafe_7pvgroup_groupStatus, 0, (char *)0, 0}, + {(char *)"groupHandle", __pyx_getprop_6PyCafe_7pvgroup_groupHandle, __pyx_setprop_6PyCafe_7pvgroup_groupHandle, (char *)0, 0}, + {(char *)"rule", __pyx_getprop_6PyCafe_7pvgroup_rule, __pyx_setprop_6PyCafe_7pvgroup_rule, (char *)0, 0}, + {(char *)"hasAlarm", __pyx_getprop_6PyCafe_7pvgroup_hasAlarm, __pyx_setprop_6PyCafe_7pvgroup_hasAlarm, (char *)0, 0}, + {(char *)"hasTS", __pyx_getprop_6PyCafe_7pvgroup_hasTS, __pyx_setprop_6PyCafe_7pvgroup_hasTS, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_pvgroup = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.pvgroup", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_pvgroup), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_pvgroup, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_pvgroup, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_pvgroup, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_pvgroup, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_pvgroup, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_pvgroup, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_6PyCafe_CyCafe __pyx_vtable_6PyCafe_CyCafe; + +static PyObject *__pyx_tp_new_6PyCafe_CyCafe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6PyCafe_CyCafe *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6PyCafe_CyCafe *)o); + p->__pyx_vtab = __pyx_vtabptr_6PyCafe_CyCafe; + new((void*)&(p->valStr)) std::string(); + new((void*)&(p->vFloat)) std::vector (); + new((void*)&(p->vInt)) std::vector (); + new((void*)&(p->vStr)) std::vector (); + new((void*)&(p->cs)) CAFEStatus(); + new((void*)&(p->css)) CAFEStatusSeverity(); + new((void*)&(p->hh)) HandleHelper(); + new((void*)&(p->ph)) PolicyHelper(); + new((void*)&(p->channelInfo)) ChannelRegalia(); + p->_exception_text = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6CyCafe_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCafe(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCafe *p = (struct __pyx_obj_6PyCafe_CyCafe *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_6PyCafe_6CyCafe_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + __Pyx_call_destructor(p->valStr); + __Pyx_call_destructor(p->vFloat); + __Pyx_call_destructor(p->vInt); + __Pyx_call_destructor(p->vStr); + __Pyx_call_destructor(p->cs); + __Pyx_call_destructor(p->css); + __Pyx_call_destructor(p->hh); + __Pyx_call_destructor(p->ph); + __Pyx_call_destructor(p->channelInfo); + Py_CLEAR(p->_exception_text); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_6CyCafe_enableExceptions(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_1__get__(o); +} + +static int __pyx_setprop_6PyCafe_6CyCafe_enableExceptions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_6PyCafe_6CyCafe_16enableExceptions_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCafe[] = { + {"get_wf_express", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_5get_wf_express, METH_VARARGS|METH_KEYWORDS, 0}, + {"ca_version", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_7ca_version, METH_NOARGS, 0}, + {"epics_version_string", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_9epics_version_string, METH_NOARGS, 0}, + {"CAFE_version", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_11CAFE_version, METH_NOARGS, 0}, + {"EPICS_version", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_13EPICS_version, METH_NOARGS, 0}, + {"setPyConnectCallbackFn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_15setPyConnectCallbackFn, METH_VARARGS|METH_KEYWORDS, 0}, + {"init", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_17init, METH_NOARGS, __pyx_doc_6PyCafe_6CyCafe_16init}, + {"withExceptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_19withExceptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6PyCafe_6CyCafe_18withExceptions}, + {"isValid", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_21isValid, METH_O, 0}, + {"removeWidget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_23removeWidget, METH_VARARGS|METH_KEYWORDS, 0}, + {"addWidget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_25addWidget, METH_VARARGS|METH_KEYWORDS, 0}, + {"getWidgets", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_27getWidgets, METH_O, 0}, + {"open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_29open, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6PyCafe_6CyCafe_28open}, + {"openNoWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_31openNoWait, METH_NOARGS, 0}, + {"openPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_33openPrepare, METH_NOARGS, 0}, + {"openGroupPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_35openGroupPrepare, METH_NOARGS, 0}, + {"setOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_37setOpenDefaultPendTime, METH_O, 0}, + {"getOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_39getOpenDefaultPendTime, METH_NOARGS, 0}, + {"openNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_41openNow, METH_NOARGS, 0}, + {"openNowAndWait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_43openNowAndWait, METH_VARARGS|METH_KEYWORDS, 0}, + {"openGroupNowAndWait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_45openGroupNowAndWait, METH_VARARGS|METH_KEYWORDS, 0}, + {"openGroupNowAndWaitForInputGroups", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_47openGroupNowAndWaitForInputGroups, METH_VARARGS|METH_KEYWORDS, 0}, + {"openMonitorPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_49openMonitorPrepare, METH_NOARGS, 0}, + {"openMonitorNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_51openMonitorNow, METH_NOARGS, 0}, + {"openMonitorNowAndWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_53openMonitorNowAndWait, METH_O, 0}, + {"ca_pend_event", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_55ca_pend_event, METH_O, 0}, + {"ca_pend_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_57ca_pend_io, METH_O, 0}, + {"ca_poll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_59ca_poll, METH_NOARGS, 0}, + {"ca_flush_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_61ca_flush_io, METH_NOARGS, 0}, + {"setChannelRequestPolicyGet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_63setChannelRequestPolicyGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"initCallbackComplete", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_65initCallbackComplete, METH_O, 0}, + {"setCallbackGet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_67setCallbackGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCallbackPut", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_69setCallbackPut, METH_VARARGS|METH_KEYWORDS, 0}, + {"setTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_71setTimeout, METH_O, 0}, + {"getTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_73getTimeoutGet, METH_NOARGS, 0}, + {"getTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_75getTimeoutPut, METH_NOARGS, 0}, + {"setSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_77setSelfGoverningTimeout, METH_O, 0}, + {"setSGTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_79setSGTimeout, METH_O, 0}, + {"getSGTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_81getSGTimeoutGet, METH_NOARGS, 0}, + {"getSGTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_83getSGTimeoutPut, METH_NOARGS, 0}, + {"setSGSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_85setSGSelfGoverningTimeout, METH_O, 0}, + {"getContext", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_87getContext, METH_O, 0}, + {"attachContext", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_89attachContext, METH_O, 0}, + {"collectionDefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_91collectionDefine, METH_VARARGS|METH_KEYWORDS, 0}, + {"defineCollection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_93defineCollection, METH_VARARGS|METH_KEYWORDS, 0}, + {"collectionList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_95collectionList, METH_NOARGS, 0}, + {"collectionMemberList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_97collectionMemberList, METH_O, 0}, + {"devicePositionMap", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_99devicePositionMap, METH_O, 0}, + {"devicePositionV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_101devicePositionV, METH_O, 0}, + {"groupList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_103groupList, METH_NOARGS, 0}, + {"getDataTypeNative", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_105getDataTypeNative, METH_O, 0}, + {"getDataTypeRequest", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_107getDataTypeRequest, METH_O, 0}, + {"getMonitorIDInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_109getMonitorIDInCallback, METH_O, 0}, + {"getDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_111getDataTypeInCallback, METH_O, 0}, + {"getDbrDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_113getDbrDataTypeInCallback, METH_O, 0}, + {"getDbrBaseInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_115getDbrBaseInCallback, METH_O, 0}, + {"getHandlesFromWithinGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_117getHandlesFromWithinGroup, METH_O, 0}, + {"close", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_119close, METH_O, 0}, + {"closeChannels", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_121closeChannels, METH_NOARGS, 0}, + {"closeHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_123closeHandles, METH_O, 0}, + {"closeDisconnectedChannelsWithinGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_125closeDisconnectedChannelsWithinGroup, METH_O, 0}, + {"closeChannelKeepHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_127closeChannelKeepHandle, METH_O, 0}, + {"reconnect", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_129reconnect, METH_O, 0}, + {"allConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_131allConnected, METH_NOARGS, 0}, + {"isConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_133isConnected, METH_O, 0}, + {"supplementHandles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_135supplementHandles, METH_VARARGS|METH_KEYWORDS, 0}, + {"supplementHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_137supplementHandle, METH_O, 0}, + {"supplementHandlesV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_139supplementHandlesV, METH_O, 0}, + {"printDisconnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_141printDisconnected, METH_NOARGS, 0}, + {"printDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_143printDisconnectedHandles, METH_NOARGS, 0}, + {"printHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_145printHandles, METH_NOARGS, 0}, + {"printHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_147printHandle, METH_O, 0}, + {"printHandlesV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_149printHandlesV, METH_O, 0}, + {"getDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_151getDisconnectedHandles, METH_NOARGS, 0}, + {"getHandles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_153getHandles, METH_VARARGS|METH_KEYWORDS, 0}, + {"getHandleStates", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_155getHandleStates, METH_NOARGS, 0}, + {"getStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_157getStatusSeverity, METH_O, 0}, + {"getStatusCodeAsText", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_159getStatusCodeAsText, METH_O, 0}, + {"getStatusCodeAsString", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_161getStatusCodeAsString, METH_O, 0}, + {"getStatusInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_163getStatusInfo, METH_O, 0}, + {"getStatusMsg", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_165getStatusMsg, METH_O, 0}, + {"getStatus", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_167getStatus, METH_O, 0}, + {"getChannelDevice", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_169getChannelDevice, METH_O, 0}, + {"getChannelAttribute", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_171getChannelAttribute, METH_O, 0}, + {"getDescription", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_173getDescription, METH_O, 0}, + {"hasDescription", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_175hasDescription, METH_O, 0}, + {"getUnits", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_177getUnits, METH_O, 0}, + {"getPrecision", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_179getPrecision, METH_O, 0}, + {"hasAlarmStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_181hasAlarmStatusSeverity, METH_O, 0}, + {"getAlarmStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_183getAlarmStatusSeverity, METH_O, 0}, + {"getTimeStamp", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_185getTimeStamp, METH_O, 0}, + {"getTimeStampAsDate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_187getTimeStampAsDate, METH_O, 0}, + {"checkForHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_189checkForHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForHandleList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_191checkForHandleList, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForGroupHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_193checkForGroupHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVNameFromHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_195getPVNameFromHandle, METH_O, 0}, + {"getHandleFromPVName", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_197getHandleFromPVName, METH_O, 0}, + {"getPVFromHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_199getPVFromHandle, METH_O, 0}, + {"getHandleFromPV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_201getHandleFromPV, METH_O, 0}, + {"getChannelDataStore", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_203getChannelDataStore, METH_O, 0}, + {"getChannelInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_205getChannelInfo, METH_O, 0}, + {"getChannelList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_207getChannelList, METH_O, 0}, + {"getWFAsString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_209getWFAsString, METH_VARARGS|METH_KEYWORDS, 0}, + {"getWFAsStringCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_211getWFAsStringCache, METH_O, 0}, + {"isEnum", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_213isEnum, METH_O, 0}, + {"getEnumStrings", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_215getEnumStrings, METH_O, 0}, + {"getEnumFromString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_217getEnumFromString, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStringFromEnum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_219getStringFromEnum, METH_VARARGS|METH_KEYWORDS, 0}, + {"setDbrBase", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_221setDbrBase, METH_VARARGS|METH_KEYWORDS, 0}, + {"getDbrBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_223getDbrBase, METH_O, 0}, + {"setGetCacheWaitPolicy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_225setGetCacheWaitPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetCacheWaitPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_227setGetCacheWaitPolicyAllHandles, METH_O, 0}, + {"setGetActionWhenMonitorPolicy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_229setGetActionWhenMonitorPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetActionWhenMonitorPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_231setGetActionWhenMonitorPolicyAllHandles, METH_O, 0}, + {"getNonBlocking", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_233getNonBlocking, METH_O, __pyx_doc_6PyCafe_6CyCafe_232getNonBlocking}, + {"getStr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_235getStr, METH_VARARGS|METH_KEYWORDS, 0}, + {"getInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_237getInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_239getFloat, METH_VARARGS|METH_KEYWORDS, 0}, + {"caget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_241caget, METH_VARARGS|METH_KEYWORDS, 0}, + {"caput", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_243caput, METH_VARARGS|METH_KEYWORDS, 0}, + {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_245get, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_247getIntList, METH_O, 0}, + {"getFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_249getFloatList, METH_O, 0}, + {"getStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_251getStrList, METH_O, 0}, + {"getList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_253getList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_255getStrArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_257getIntArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_259getFloatArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_261getArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_263getPVInt, METH_O, 0}, + {"getPVFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_265getPVFloat, METH_O, 0}, + {"getPVStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_267getPVStr, METH_O, 0}, + {"getPV", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_269getPV, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_271getPVStrList, METH_O, 0}, + {"getPVIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_273getPVIntList, METH_O, 0}, + {"getPVFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_275getPVFloatList, METH_O, 0}, + {"getPVList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_277getPVList, METH_VARARGS|METH_KEYWORDS, 0}, + {"printStatusIfError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_279printStatusIfError, METH_VARARGS|METH_KEYWORDS, 0}, + {"getAsyn", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_281getAsyn, METH_O, 0}, + {"waitForGetEvent", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_283waitForGetEvent, METH_O, 0}, + {"waitForBundledEvents", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_285waitForBundledEvents, METH_O, 0}, + {"getScalarArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_287getScalarArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_289getStrScalarList, METH_O, 0}, + {"getIntScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_291getIntScalarList, METH_O, 0}, + {"getFloatScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_293getFloatScalarList, METH_O, 0}, + {"getScalarList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_295getScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getDictionary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_297getDictionary, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_299getCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundPVGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_301getCompoundPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_303getStrCache, METH_O, 0}, + {"getIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_305getIntCache, METH_O, 0}, + {"getFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_307getFloatCache, METH_O, 0}, + {"getCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_309getCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_311getStrArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_313getIntArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_315getFloatArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArrayCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_317getArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_319getPVStrCache, METH_O, 0}, + {"getPVIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_321getPVIntCache, METH_O, 0}, + {"getPVFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_323getPVFloatCache, METH_O, 0}, + {"getPVCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_325getPVCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_327getCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrlCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_329getCtrlCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStop", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_331groupMonitorStop, METH_O, 0}, + {"getMonitorPolicyVector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_333getMonitorPolicyVector, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_335groupMonitor, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_337groupMonitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStartWithCBList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_339groupMonitorStartWithCBList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getHandleFromPVWithinGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_341getHandleFromPVWithinGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_343getGroupStr, METH_O, 0}, + {"getGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_345getGroupInt, METH_O, 0}, + {"getGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_347getGroupFloat, METH_O, 0}, + {"getGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_349getGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_351getGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_353getPVGroupStr, METH_O, 0}, + {"getPVGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_355getPVGroupInt, METH_O, 0}, + {"getPVGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_357getPVGroupFloat, METH_O, 0}, + {"getPVGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_359getPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_361getPVGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"PVGroupValuesToList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_363PVGroupValuesToList, METH_O, 0}, + {"groupMemberList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_365groupMemberList, METH_O, 0}, + {"grouping", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_367grouping, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupDefineFromCollection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_369groupDefineFromCollection, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupDefine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_371groupDefine, METH_VARARGS|METH_KEYWORDS, 0}, + {"defineGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_373defineGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupOpen", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_375groupOpen, METH_O, 0}, + {"groupClose", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_377groupClose, METH_VARARGS|METH_KEYWORDS, 0}, + {"isGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_379isGroup, METH_O, 0}, + {"isCollection", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_381isCollection, METH_O, 0}, + {"getNoMonitors", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_383getNoMonitors, METH_O, 0}, + {"getMonitorIDsInWaiting", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_385getMonitorIDsInWaiting, METH_O, 0}, + {"getMonitorIDs", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_387getMonitorIDs, METH_O, 0}, + {"updateMonitorPolicyDeltaMS", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_389updateMonitorPolicyDeltaMS, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_391monitor, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_393monitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_395monitorStop, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStopAll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_397monitorStopAll, METH_NOARGS, 0}, + {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_399set, METH_VARARGS|METH_KEYWORDS, 0}, + {"setScalarList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_401setScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCompoundList", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_403setCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_405setGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"gameSetAndMatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_407gameSetAndMatch, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatchMany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_409setAndMatchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_411setAndMatch, METH_VARARGS|METH_KEYWORDS, 0}, + {"matchMany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_413matchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"matchManyWithStatus", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_415matchManyWithStatus, METH_VARARGS|METH_KEYWORDS, 0}, + {"match", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_417match, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemCtrl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_419setNelemCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_421setNelem, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemToNative", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_423setNelemToNative, METH_O, 0}, + {"setNelemToRetrieveFromCacheToOne", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_425setNelemToRetrieveFromCacheToOne, METH_O, 0}, + {"setNelemToRetrieveFromCache", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6PyCafe_6CyCafe_427setNelemToRetrieveFromCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"terminate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_429terminate, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_431__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_433__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCafe[] = { + {(char *)"enableExceptions", __pyx_getprop_6PyCafe_6CyCafe_enableExceptions, __pyx_setprop_6PyCafe_6CyCafe_enableExceptions, (char *)"Activate/deactivate CAFE exceptions for single channel operations.\n\n The default value is True. \n If set to False, the user is obliged to examine the return code of any \n set/get method that instigates a CAFE transaction on a single channel.\n\n Returns:\n bool: The current value\n ::\n\n cafe.enableExceptions = True | False\n res = cafe.enableExceptions\n\n ", 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CyCafe = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CyCafe", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CyCafe), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CyCafe, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + "\n Class with associated process variable meta data.\n\n Attributes:\n _c_cafe (PyCafe.CAFE): The CAFE class. \n _enable_exceptions (bool): Activates exceptions for single pv operations \n _exception_text (str): Default text for CyCafe exceptions that do not\n originate from the C++ CAFE exception\n\n ", /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CyCafe, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CyCafe, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe_CyCafe, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *__pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[8]; +static int __pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv = 0; + +static PyObject *__pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)))) { + o = (PyObject*)__pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[--__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv]; + memset(o, 0, sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o) { + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_func); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv)))) { + __pyx_freelist_6PyCafe___pyx_scope_struct__verify_handlepv[__pyx_freecount_6PyCafe___pyx_scope_struct__verify_handlepv++] = ((struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + if (p->__pyx_v_func) { + e = (*v)(p->__pyx_v_func, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe___pyx_scope_struct__verify_handlepv(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *p = (struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv *)o; + tmp = ((PyObject*)p->__pyx_v_func); + p->__pyx_v_func = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.__pyx_scope_struct__verify_handlepv", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe___pyx_scope_struct__verify_handlepv), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*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*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6PyCafe___pyx_scope_struct__verify_handlepv, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_array __pyx_vtable_array; + +static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_array_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_array_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_array; + p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_array(PyObject *o) { + struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_array___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->mode); + Py_CLEAR(p->_format); + (*Py_TYPE(o)->tp_free)(o); +} +static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_array___setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) { + PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_array___getattr__(o, n); + } + return v; +} + +static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o); +} + +static PyMethodDef __pyx_methods_array[] = { + {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_array[] = { + {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_array = { + __pyx_array___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_array, /*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_array = { + __pyx_array___len__, /*mp_length*/ + __pyx_array___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_array = { + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getreadbuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getwritebuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getsegcount*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getcharbuffer*/ + #endif + __pyx_array_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_array = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.array", /*tp_name*/ + sizeof(struct __pyx_array_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_array, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_array, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_array, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + __pyx_tp_getattro_array, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_array, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_array, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_array, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_array, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_MemviewEnum_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_MemviewEnum_obj *)o); + p->name = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_Enum(PyObject *o) { + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->name); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + if (p->name) { + e = (*v)(p->name, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_Enum(PyObject *o) { + PyObject* tmp; + struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o; + tmp = ((PyObject*)p->name); + p->name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_Enum[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type___pyx_MemviewEnum = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.Enum", /*tp_name*/ + sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_Enum, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + __pyx_MemviewEnum___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_Enum, /*tp_traverse*/ + __pyx_tp_clear_Enum, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_Enum, /*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_MemviewEnum___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_Enum, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview; + +static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryview_obj *p; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryview_obj *)o); + p->__pyx_vtab = __pyx_vtabptr_memoryview; + p->obj = Py_None; Py_INCREF(Py_None); + p->_size = Py_None; Py_INCREF(Py_None); + p->_array_interface = Py_None; Py_INCREF(Py_None); + p->view.obj = NULL; + if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_memoryview(PyObject *o) { + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_memoryview___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->obj); + Py_CLEAR(p->_size); + Py_CLEAR(p->_array_interface); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + if (p->obj) { + e = (*v)(p->obj, a); if (e) return e; + } + if (p->_size) { + e = (*v)(p->_size, a); if (e) return e; + } + if (p->_array_interface) { + e = (*v)(p->_array_interface, a); if (e) return e; + } + if (p->view.obj) { + e = (*v)(p->view.obj, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_memoryview(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + tmp = ((PyObject*)p->obj); + p->obj = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_size); + p->_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_array_interface); + p->_array_interface = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + Py_CLEAR(p->view.obj); + return 0; +} +static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_memoryview___setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o); +} + +static PyMethodDef __pyx_methods_memoryview[] = { + {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0}, + {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0}, + {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0}, + {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_memoryview[] = { + {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0}, + {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0}, + {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0}, + {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0}, + {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0}, + {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0}, + {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0}, + {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0}, + {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_memoryview = { + __pyx_memoryview___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_memoryview, /*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_memoryview = { + __pyx_memoryview___len__, /*mp_length*/ + __pyx_memoryview___getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_memoryview = { + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getreadbuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getwritebuffer*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getsegcount*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*bf_getcharbuffer*/ + #endif + __pyx_memoryview_getbuffer, /*bf_getbuffer*/ + 0, /*bf_releasebuffer*/ +}; + +static PyTypeObject __pyx_type___pyx_memoryview = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.memoryview", /*tp_name*/ + sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_memoryview, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + __pyx_memoryview___repr__, /*tp_repr*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_memoryview___str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_memoryview, /*tp_traverse*/ + __pyx_tp_clear_memoryview, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_memoryview, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_memoryview, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_memoryview, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; +static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice; + +static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_memoryviewslice_obj *p; + PyObject *o = __pyx_tp_new_memoryview(t, a, k); + if (unlikely(!o)) return 0; + p = ((struct __pyx_memoryviewslice_obj *)o); + p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice; + p->from_object = Py_None; Py_INCREF(Py_None); + p->from_slice.memview = NULL; + return o; +} + +static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_memoryviewslice___dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->from_object); + PyObject_GC_Track(o); + __pyx_tp_dealloc_memoryview(o); +} + +static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e; + if (p->from_object) { + e = (*v)(p->from_object, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear__memoryviewslice(PyObject *o) { + PyObject* tmp; + struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o; + __pyx_tp_clear_memoryview(o); + tmp = ((PyObject*)p->from_object); + p->from_object = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + __PYX_XDEC_MEMVIEW(&p->from_slice, 1); + return 0; +} + +static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o); +} + +static PyMethodDef __pyx_methods__memoryviewslice[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = { + {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type___pyx_memoryviewslice = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe._memoryviewslice", /*tp_name*/ + sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + #if CYTHON_COMPILING_IN_PYPY + __pyx_memoryview___repr__, /*tp_repr*/ + #else + 0, /*tp_repr*/ + #endif + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_memoryview___str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + "Internal class for passing memoryview slices to Python", /*tp_doc*/ + __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/ + __pyx_tp_clear__memoryviewslice, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods__memoryviewslice, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets__memoryviewslice, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new__memoryviewslice, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +}; + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_PyCafe(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_PyCafe}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "PyCafe", + __pyx_k_Cython_interface_to_the_C_CAFE_l, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0}, + {&__pyx_kp_u_0_1_2_3_4_5, __pyx_k_0_1_2_3_4_5, sizeof(__pyx_k_0_1_2_3_4_5), 0, 1, 0, 0}, + {&__pyx_kp_u_1_19_3_py37_gcc_7_3_0, __pyx_k_1_19_3_py37_gcc_7_3_0, sizeof(__pyx_k_1_19_3_py37_gcc_7_3_0), 0, 1, 0, 0}, + {&__pyx_kp_u_7_0_6, __pyx_k_7_0_6, sizeof(__pyx_k_7_0_6), 0, 1, 0, 0}, + {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, + {&__pyx_kp_u_A_handle_can_never_hold_a_negati, __pyx_k_A_handle_can_never_hold_a_negati, sizeof(__pyx_k_A_handle_can_never_hold_a_negati), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_ChannelGetActionWhenMoni, __pyx_k_Allowed_ChannelGetActionWhenMoni, sizeof(__pyx_k_Allowed_ChannelGetActionWhenMoni), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_ChannelGetCacheWaitPolic, __pyx_k_Allowed_ChannelGetCacheWaitPolic, sizeof(__pyx_k_Allowed_ChannelGetCacheWaitPolic), 0, 1, 0, 0}, + {&__pyx_kp_u_Allowed_DBR_TYPEs_are, __pyx_k_Allowed_DBR_TYPEs_are, sizeof(__pyx_k_Allowed_DBR_TYPEs_are), 0, 1, 0, 0}, + {&__pyx_kp_u_Analysing_statusList, __pyx_k_Analysing_statusList, sizeof(__pyx_k_Analysing_statusList), 0, 1, 0, 0}, + {&__pyx_n_s_Array, __pyx_k_Array, sizeof(__pyx_k_Array), 0, 0, 1, 1}, + {&__pyx_kp_u_Assuming_DBR_TIME, __pyx_k_Assuming_DBR_TIME, sizeof(__pyx_k_Assuming_DBR_TIME), 0, 1, 0, 0}, + {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, + {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1}, + {&__pyx_n_u_CAFEException, __pyx_k_CAFEException, sizeof(__pyx_k_CAFEException), 0, 1, 0, 1}, + {&__pyx_n_u_CafeError, __pyx_k_CafeError, sizeof(__pyx_k_CafeError), 0, 1, 0, 1}, + {&__pyx_kp_u_CafeException, __pyx_k_CafeException, sizeof(__pyx_k_CafeException), 0, 1, 0, 0}, + {&__pyx_n_s_CafeException_2, __pyx_k_CafeException_2, sizeof(__pyx_k_CafeException_2), 0, 0, 1, 1}, + {&__pyx_n_u_CafePVError, __pyx_k_CafePVError, sizeof(__pyx_k_CafePVError), 0, 1, 0, 1}, + {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0}, + {&__pyx_n_u_Channel, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 1, 0, 1}, + {&__pyx_n_s_CyCa, __pyx_k_CyCa, sizeof(__pyx_k_CyCa), 0, 0, 1, 1}, + {&__pyx_n_s_CyCafe, __pyx_k_CyCafe, sizeof(__pyx_k_CyCafe), 0, 0, 1, 1}, + {&__pyx_n_s_Cython, __pyx_k_Cython, sizeof(__pyx_k_Cython), 0, 0, 1, 1}, + {&__pyx_n_s_Cython_Compiler_Options, __pyx_k_Cython_Compiler_Options, sizeof(__pyx_k_Cython_Compiler_Options), 0, 0, 1, 1}, + {&__pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2, __pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2, sizeof(__pyx_k_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Data_to_be_presented_in_native_d, __pyx_k_Data_to_be_presented_in_native_d, sizeof(__pyx_k_Data_to_be_presented_in_native_d), 0, 1, 0, 0}, + {&__pyx_kp_u_Datatype_unknown_returning_value, __pyx_k_Datatype_unknown_returning_value, sizeof(__pyx_k_Datatype_unknown_returning_value), 0, 1, 0, 0}, + {&__pyx_kp_u_EGU, __pyx_k_EGU, sizeof(__pyx_k_EGU), 0, 1, 0, 0}, + {&__pyx_kp_u_ENUM_string_value, __pyx_k_ENUM_string_value, sizeof(__pyx_k_ENUM_string_value), 0, 1, 0, 0}, + {&__pyx_kp_u_ENUM_value, __pyx_k_ENUM_value, sizeof(__pyx_k_ENUM_value), 0, 1, 0, 0}, + {&__pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH, __pyx_k_ERROR_GROUP_MEMBER_MISMATCH, sizeof(__pyx_k_ERROR_GROUP_MEMBER_MISMATCH), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_13), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_14), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_15), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_16, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_16, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_16), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_2, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3, __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3, sizeof(__pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3), 0, 1, 0, 0}, + {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1}, + {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0}, + {&__pyx_kp_u_Entering_0_for_element, __pyx_k_Entering_0_for_element, sizeof(__pyx_k_Entering_0_for_element), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_Warning_from_def_getAsyn, __pyx_k_Error_Warning_from_def_getAsyn, sizeof(__pyx_k_Error_Warning_from_def_getAsyn), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_Element, __pyx_k_Error_in_Element, sizeof(__pyx_k_Error_in_Element), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_PyCafe_def_getPVGroupCa, __pyx_k_Error_in_PyCafe_def_getPVGroupCa, sizeof(__pyx_k_Error_in_PyCafe_def_getPVGroupCa), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S, __pyx_k_Error_in_PyCafe_def_getPVGroup_S, sizeof(__pyx_k_Error_in_PyCafe_def_getPVGroup_S), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getCompoundList, __pyx_k_Error_in_def_getCompoundList, sizeof(__pyx_k_Error_in_def_getCompoundList), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getScalarArray, __pyx_k_Error_in_def_getScalarArray, sizeof(__pyx_k_Error_in_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_getScalarList, __pyx_k_Error_in_def_getScalarList, sizeof(__pyx_k_Error_in_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_grouping_for_group, __pyx_k_Error_in_def_grouping_for_group, sizeof(__pyx_k_Error_in_def_grouping_for_group), 0, 1, 0, 0}, + {&__pyx_kp_u_Error_in_def_waitForBundledEvent, __pyx_k_Error_in_def_waitForBundledEvent, sizeof(__pyx_k_Error_in_def_waitForBundledEvent), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_from_CyCafe_met, __pyx_k_Exception_raised_from_CyCafe_met, sizeof(__pyx_k_Exception_raised_from_CyCafe_met), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_in, __pyx_k_Exception_raised_in, sizeof(__pyx_k_Exception_raised_in), 0, 1, 0, 0}, + {&__pyx_kp_u_Exception_raised_in_PyCafe_pyx, __pyx_k_Exception_raised_in_PyCafe_pyx, sizeof(__pyx_k_Exception_raised_in_PyCafe_pyx), 0, 1, 0, 0}, + {&__pyx_kp_u_Execute_getEnumStrings_handlePV, __pyx_k_Execute_getEnumStrings_handlePV, sizeof(__pyx_k_Execute_getEnumStrings_handlePV), 0, 1, 0, 0}, + {&__pyx_kp_u_Failed_to_instantiate_CAFE, __pyx_k_Failed_to_instantiate_CAFE, sizeof(__pyx_k_Failed_to_instantiate_CAFE), 0, 1, 0, 0}, + {&__pyx_kp_u_First_Input_argument_should_be_o, __pyx_k_First_Input_argument_should_be_o, sizeof(__pyx_k_First_Input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_if_not_list, __pyx_k_First_input_argument_if_not_list, sizeof(__pyx_k_First_input_argument_if_not_list), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_if_not_list_2, __pyx_k_First_input_argument_if_not_list_2, sizeof(__pyx_k_First_input_argument_if_not_list_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a, __pyx_k_First_input_argument_should_be_a, sizeof(__pyx_k_First_input_argument_should_be_a), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_2, __pyx_k_First_input_argument_should_be_a_2, sizeof(__pyx_k_First_input_argument_should_be_a_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_3, __pyx_k_First_input_argument_should_be_a_3, sizeof(__pyx_k_First_input_argument_should_be_a_3), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_a_4, __pyx_k_First_input_argument_should_be_a_4, sizeof(__pyx_k_First_input_argument_should_be_a_4), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_c, __pyx_k_First_input_argument_should_be_c, sizeof(__pyx_k_First_input_argument_should_be_c), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o, __pyx_k_First_input_argument_should_be_o, sizeof(__pyx_k_First_input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_10, __pyx_k_First_input_argument_should_be_o_10, sizeof(__pyx_k_First_input_argument_should_be_o_10), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_11, __pyx_k_First_input_argument_should_be_o_11, sizeof(__pyx_k_First_input_argument_should_be_o_11), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_2, __pyx_k_First_input_argument_should_be_o_2, sizeof(__pyx_k_First_input_argument_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_3, __pyx_k_First_input_argument_should_be_o_3, sizeof(__pyx_k_First_input_argument_should_be_o_3), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_4, __pyx_k_First_input_argument_should_be_o_4, sizeof(__pyx_k_First_input_argument_should_be_o_4), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_5, __pyx_k_First_input_argument_should_be_o_5, sizeof(__pyx_k_First_input_argument_should_be_o_5), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_6, __pyx_k_First_input_argument_should_be_o_6, sizeof(__pyx_k_First_input_argument_should_be_o_6), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_7, __pyx_k_First_input_argument_should_be_o_7, sizeof(__pyx_k_First_input_argument_should_be_o_7), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_8, __pyx_k_First_input_argument_should_be_o_8, sizeof(__pyx_k_First_input_argument_should_be_o_8), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_o_9, __pyx_k_First_input_argument_should_be_o_9, sizeof(__pyx_k_First_input_argument_should_be_o_9), 0, 1, 0, 0}, + {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, + {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N, __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N, sizeof(__pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2, __pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2, sizeof(__pyx_k_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1, __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1, sizeof(__pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1), 0, 1, 0, 0}, + {&__pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2, __pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2, sizeof(__pyx_k_GET_FROM_CACHE_0_GET_FROM_IOC_1_2), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_HANDLE, __pyx_k_GROUP_HANDLE, sizeof(__pyx_k_GROUP_HANDLE), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_NAME, __pyx_k_GROUP_NAME, sizeof(__pyx_k_GROUP_NAME), 0, 1, 0, 0}, + {&__pyx_kp_u_GROUP_STATUS, __pyx_k_GROUP_STATUS, sizeof(__pyx_k_GROUP_STATUS), 0, 1, 0, 0}, + {&__pyx_kp_u_Handle, __pyx_k_Handle, sizeof(__pyx_k_Handle), 0, 1, 0, 0}, + {&__pyx_kp_u_Handle_2, __pyx_k_Handle_2, sizeof(__pyx_k_Handle_2), 0, 1, 0, 0}, + {&__pyx_n_u_ICAFE_CA_OP_CONN_DOWN, __pyx_k_ICAFE_CA_OP_CONN_DOWN, sizeof(__pyx_k_ICAFE_CA_OP_CONN_DOWN), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_CS_NEVER_CONN, __pyx_k_ICAFE_CS_NEVER_CONN, sizeof(__pyx_k_ICAFE_CS_NEVER_CONN), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_NORMAL, __pyx_k_ICAFE_NORMAL, sizeof(__pyx_k_ICAFE_NORMAL), 0, 1, 0, 1}, + {&__pyx_n_u_ICAFE_TYPENOTCONN, __pyx_k_ICAFE_TYPENOTCONN, sizeof(__pyx_k_ICAFE_TYPENOTCONN), 0, 1, 0, 1}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x8a, __pyx_k_Incompatible_checksums_s_vs_0x8a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x8a), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0}, + {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, + {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0}, + {&__pyx_kp_u_Input_argument_if_given_should_b, __pyx_k_Input_argument_if_given_should_b, sizeof(__pyx_k_Input_argument_if_given_should_b), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_pv_should_be_of_t, __pyx_k_Input_argument_pv_should_be_of_t, sizeof(__pyx_k_Input_argument_pv_should_be_of_t), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_should_be_of_type, __pyx_k_Input_argument_should_be_of_type, sizeof(__pyx_k_Input_argument_should_be_of_type), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_argument_should_be_of_type_2, __pyx_k_Input_argument_should_be_of_type_2, sizeof(__pyx_k_Input_argument_should_be_of_type_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Input_data_whether_within_a_list, __pyx_k_Input_data_whether_within_a_list, sizeof(__pyx_k_Input_data_whether_within_a_list), 0, 1, 0, 0}, + {&__pyx_kp_u_Invalid_handle_of_type_class_int, __pyx_k_Invalid_handle_of_type_class_int, sizeof(__pyx_k_Invalid_handle_of_type_class_int), 0, 1, 0, 0}, + {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0}, + {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_o, __pyx_k_List_input_arguments_should_be_o, sizeof(__pyx_k_List_input_arguments_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_o_2, __pyx_k_List_input_arguments_should_be_o_2, sizeof(__pyx_k_List_input_arguments_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_List_input_arguments_should_be_t, __pyx_k_List_input_arguments_should_be_t, sizeof(__pyx_k_List_input_arguments_should_be_t), 0, 1, 0, 0}, + {&__pyx_kp_u_Member, __pyx_k_Member, sizeof(__pyx_k_Member), 0, 1, 0, 0}, + {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, + {&__pyx_n_s_MemoryNanny, __pyx_k_MemoryNanny, sizeof(__pyx_k_MemoryNanny), 0, 0, 1, 1}, + {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0}, + {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0}, + {&__pyx_kp_u_No_Members, __pyx_k_No_Members, sizeof(__pyx_k_No_Members), 0, 1, 0, 0}, + {&__pyx_kp_u_No_of_group_members_is, __pyx_k_No_of_group_members_is, sizeof(__pyx_k_No_of_group_members_is), 0, 1, 0, 0}, + {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, + {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0}, + {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, + {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1}, + {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0}, + {&__pyx_kp_u_PV, __pyx_k_PV, sizeof(__pyx_k_PV), 0, 1, 0, 0}, + {&__pyx_kp_u_PV_2, __pyx_k_PV_2, sizeof(__pyx_k_PV_2), 0, 1, 0, 0}, + {&__pyx_kp_u_PV_3, __pyx_k_PV_3, sizeof(__pyx_k_PV_3), 0, 1, 0, 0}, + {&__pyx_n_u_PV_4, __pyx_k_PV_4, sizeof(__pyx_k_PV_4), 0, 1, 0, 1}, + {&__pyx_kp_u_PY_VERSION_HEX_is, __pyx_k_PY_VERSION_HEX_is, sizeof(__pyx_k_PY_VERSION_HEX_is), 0, 1, 0, 0}, + {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, + {&__pyx_kp_u_Possible_types_are, __pyx_k_Possible_types_are, sizeof(__pyx_k_Possible_types_are), 0, 1, 0, 0}, + {&__pyx_n_s_PyCafe, __pyx_k_PyCafe, sizeof(__pyx_k_PyCafe), 0, 0, 1, 1}, + {&__pyx_kp_u_PyCafe_def_setGroup_Unusual_data, __pyx_k_PyCafe_def_setGroup_Unusual_data, sizeof(__pyx_k_PyCafe_def_setGroup_Unusual_data), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE, __pyx_k_PyCafe_def_set_WARNING_DATA_TYPE, sizeof(__pyx_k_PyCafe_def_set_WARNING_DATA_TYPE), 0, 1, 0, 0}, + {&__pyx_kp_s_PyCafe_pyx, __pyx_k_PyCafe_pyx, sizeof(__pyx_k_PyCafe_pyx), 0, 0, 1, 0}, + {&__pyx_kp_u_PyCafe_pyx, __pyx_k_PyCafe_pyx, sizeof(__pyx_k_PyCafe_pyx), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t, __pyx_k_PyCafe_pyx_We_do_not_cater_for_t, sizeof(__pyx_k_PyCafe_pyx_We_do_not_cater_for_t), 0, 1, 0, 0}, + {&__pyx_kp_u_PyCafe_pyx_getArray_array_type_d, __pyx_k_PyCafe_pyx_getArray_array_type_d, sizeof(__pyx_k_PyCafe_pyx_getArray_array_type_d), 0, 1, 0, 0}, + {&__pyx_kp_u_Returning_memoryview, __pyx_k_Returning_memoryview, sizeof(__pyx_k_Returning_memoryview), 0, 1, 0, 0}, + {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, + {&__pyx_kp_u_Second_input_argument_if_not_a_l, __pyx_k_Second_input_argument_if_not_a_l, sizeof(__pyx_k_Second_input_argument_if_not_a_l), 0, 1, 0, 0}, + {&__pyx_kp_u_Second_input_argument_should_be, __pyx_k_Second_input_argument_should_be, sizeof(__pyx_k_Second_input_argument_should_be), 0, 1, 0, 0}, + {&__pyx_kp_u_Second_input_argument_should_be_2, __pyx_k_Second_input_argument_should_be_2, sizeof(__pyx_k_Second_input_argument_should_be_2), 0, 1, 0, 0}, + {&__pyx_kp_u_TIMEOUT_in_getGroup_switching_to, __pyx_k_TIMEOUT_in_getGroup_switching_to, sizeof(__pyx_k_TIMEOUT_in_getGroup_switching_to), 0, 1, 0, 0}, + {&__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to, __pyx_k_TIMEOUT_in_getGroup_swithing_to, sizeof(__pyx_k_TIMEOUT_in_getGroup_swithing_to), 0, 1, 0, 0}, + {&__pyx_kp_u_ThandlePVSet_list_member_should, __pyx_k_ThandlePVSet_list_member_should, sizeof(__pyx_k_ThandlePVSet_list_member_should), 0, 1, 0, 0}, + {&__pyx_kp_u_The_pv_name_entered_within_list, __pyx_k_The_pv_name_entered_within_list, sizeof(__pyx_k_The_pv_name_entered_within_list), 0, 1, 0, 0}, + {&__pyx_kp_u_The_value_entered_was, __pyx_k_The_value_entered_was, sizeof(__pyx_k_The_value_entered_was), 0, 1, 0, 0}, + {&__pyx_kp_u_Third_input_argument_should_be_o, __pyx_k_Third_input_argument_should_be_o, sizeof(__pyx_k_Third_input_argument_should_be_o), 0, 1, 0, 0}, + {&__pyx_kp_u_Third_input_argument_should_be_o_2, __pyx_k_Third_input_argument_should_be_o_2, sizeof(__pyx_k_Third_input_argument_should_be_o_2), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_getAsLis, __pyx_k_This_line_in_PyCafe_def_getAsLis, sizeof(__pyx_k_This_line_in_PyCafe_def_getAsLis), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_getCache, __pyx_k_This_line_in_PyCafe_def_getCache, sizeof(__pyx_k_This_line_in_PyCafe_def_getCache), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_get_shou, __pyx_k_This_line_in_PyCafe_def_get_shou, sizeof(__pyx_k_This_line_in_PyCafe_def_get_shou), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_setCompo, __pyx_k_This_line_in_PyCafe_def_setCompo, sizeof(__pyx_k_This_line_in_PyCafe_def_setCompo), 0, 1, 0, 0}, + {&__pyx_kp_u_This_line_in_PyCafe_def_setScala, __pyx_k_This_line_in_PyCafe_def_setScala, sizeof(__pyx_k_This_line_in_PyCafe_def_setScala), 0, 1, 0, 0}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_n_u_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 0, 1}, + {&__pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE, __pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE, sizeof(__pyx_k_USING_PUBLIC_PyCafe_h_INTERFACE), 0, 1, 0, 0}, + {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0}, + {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, + {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1}, + {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1}, + {&__pyx_kp_u_Unknow_array_type_in_user_reques, __pyx_k_Unknow_array_type_in_user_reques, sizeof(__pyx_k_Unknow_array_type_in_user_reques), 0, 1, 0, 0}, + {&__pyx_kp_u_Unknown_array_type_in_user_reque, __pyx_k_Unknown_array_type_in_user_reque, sizeof(__pyx_k_Unknown_array_type_in_user_reque), 0, 1, 0, 0}, + {&__pyx_n_s_UserWarning, __pyx_k_UserWarning, sizeof(__pyx_k_UserWarning), 0, 0, 1, 1}, + {&__pyx_kp_u_Valid_input_parameters_for_data, __pyx_k_Valid_input_parameters_for_data, sizeof(__pyx_k_Valid_input_parameters_for_data), 0, 1, 0, 0}, + {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1}, + {&__pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha, __pyx_k_WARNING_PyCafe_def_setDbrBase_ha, sizeof(__pyx_k_WARNING_PyCafe_def_setDbrBase_ha), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetActionW, __pyx_k_WARNING_PyCafe_def_setGetActionW, sizeof(__pyx_k_WARNING_PyCafe_def_setGetActionW), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2, __pyx_k_WARNING_PyCafe_def_setGetActionW_2, sizeof(__pyx_k_WARNING_PyCafe_def_setGetActionW_2), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa, __pyx_k_WARNING_PyCafe_def_setGetCacheWa, sizeof(__pyx_k_WARNING_PyCafe_def_setGetCacheWa), 0, 1, 0, 0}, + {&__pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2, __pyx_k_WARNING_PyCafe_def_setGetCacheWa_2, sizeof(__pyx_k_WARNING_PyCafe_def_setGetCacheWa_2), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_groupMonitorStart, __pyx_k_Warning_from_groupMonitorStart, sizeof(__pyx_k_Warning_from_groupMonitorStart), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_groupMonitorStartW, __pyx_k_Warning_from_groupMonitorStartW, sizeof(__pyx_k_Warning_from_groupMonitorStartW), 0, 1, 0, 0}, + {&__pyx_kp_u_Warning_from_monitorStart_for_h, __pyx_k_Warning_from_monitorStart_for_h, sizeof(__pyx_k_Warning_from_monitorStart_for_h), 0, 1, 0, 0}, + {&__pyx_kp_u__104, __pyx_k__104, sizeof(__pyx_k__104), 0, 1, 0, 0}, + {&__pyx_kp_u__108, __pyx_k__108, sizeof(__pyx_k__108), 0, 1, 0, 0}, + {&__pyx_kp_u__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 1, 0, 0}, + {&__pyx_kp_u__112, __pyx_k__112, sizeof(__pyx_k__112), 0, 1, 0, 0}, + {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0}, + {&__pyx_kp_u__130, __pyx_k__130, sizeof(__pyx_k__130), 0, 1, 0, 0}, + {&__pyx_kp_u__163, __pyx_k__163, sizeof(__pyx_k__163), 0, 1, 0, 0}, + {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0}, + {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, + {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, + {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, + {&__pyx_kp_u__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 1, 0, 0}, + {&__pyx_kp_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 0}, + {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0}, + {&__pyx_kp_u__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 1, 0, 0}, + {&__pyx_kp_u__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0}, + {&__pyx_kp_u__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 1, 0, 0}, + {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0}, + {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, + {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, + {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, + {&__pyx_kp_u_accessRead_d, __pyx_k_accessRead_d, sizeof(__pyx_k_accessRead_d), 0, 1, 0, 0}, + {&__pyx_kp_u_accessWrite_d, __pyx_k_accessWrite_d, sizeof(__pyx_k_accessWrite_d), 0, 1, 0, 0}, + {&__pyx_kp_u_alarmSeverity, __pyx_k_alarmSeverity, sizeof(__pyx_k_alarmSeverity), 0, 1, 0, 0}, + {&__pyx_n_s_alarmSeverityAsString, __pyx_k_alarmSeverityAsString, sizeof(__pyx_k_alarmSeverityAsString), 0, 0, 1, 1}, + {&__pyx_n_s_alarmSeverity_2, __pyx_k_alarmSeverity_2, sizeof(__pyx_k_alarmSeverity_2), 0, 0, 1, 1}, + {&__pyx_kp_u_alarmSeverity_d, __pyx_k_alarmSeverity_d, sizeof(__pyx_k_alarmSeverity_d), 0, 1, 0, 0}, + {&__pyx_kp_u_alarmStatus, __pyx_k_alarmStatus, sizeof(__pyx_k_alarmStatus), 0, 1, 0, 0}, + {&__pyx_n_s_alarmStatusAsString, __pyx_k_alarmStatusAsString, sizeof(__pyx_k_alarmStatusAsString), 0, 0, 1, 1}, + {&__pyx_n_s_alarmStatus_2, __pyx_k_alarmStatus_2, sizeof(__pyx_k_alarmStatus_2), 0, 0, 1, 1}, + {&__pyx_kp_u_alarmStatus_d, __pyx_k_alarmStatus_d, sizeof(__pyx_k_alarmStatus_d), 0, 1, 0, 0}, + {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, + {&__pyx_kp_u_and_thus_assume_a_string, __pyx_k_and_thus_assume_a_string, sizeof(__pyx_k_and_thus_assume_a_string), 0, 1, 0, 0}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_appname, __pyx_k_appname, sizeof(__pyx_k_appname), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, + {&__pyx_n_u_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 1, 0, 1}, + {&__pyx_kp_u_array_array, __pyx_k_array_array, sizeof(__pyx_k_array_array), 0, 1, 0, 0}, + {&__pyx_n_s_art, __pyx_k_art, sizeof(__pyx_k_art), 0, 0, 1, 1}, + {&__pyx_n_s_asDict, __pyx_k_asDict, sizeof(__pyx_k_asDict), 0, 0, 1, 1}, + {&__pyx_kp_u_as_channel_is_not_connected, __pyx_k_as_channel_is_not_connected, sizeof(__pyx_k_as_channel_is_not_connected), 0, 1, 0, 0}, + {&__pyx_n_u_attachContext, __pyx_k_attachContext, sizeof(__pyx_k_attachContext), 0, 1, 0, 1}, + {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1}, + {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, + {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 1, 0, 1}, + {&__pyx_n_s_bool8, __pyx_k_bool8, sizeof(__pyx_k_bool8), 0, 0, 1, 1}, + {&__pyx_n_s_bool_2, __pyx_k_bool_2, sizeof(__pyx_k_bool_2), 0, 0, 1, 1}, + {&__pyx_n_s_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 0, 1, 1}, + {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 1, 0, 1}, + {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, + {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, + {&__pyx_n_s_cMembers, __pyx_k_cMembers, sizeof(__pyx_k_cMembers), 0, 0, 1, 1}, + {&__pyx_n_s_cName, __pyx_k_cName, sizeof(__pyx_k_cName), 0, 0, 1, 1}, + {&__pyx_n_s_c_bool, __pyx_k_c_bool, sizeof(__pyx_k_c_bool), 0, 0, 1, 1}, + {&__pyx_n_s_c_byte, __pyx_k_c_byte, sizeof(__pyx_k_c_byte), 0, 0, 1, 1}, + {&__pyx_n_s_c_char, __pyx_k_c_char, sizeof(__pyx_k_c_char), 0, 0, 1, 1}, + {&__pyx_n_s_c_char_p, __pyx_k_c_char_p, sizeof(__pyx_k_c_char_p), 0, 0, 1, 1}, + {&__pyx_n_s_c_double, __pyx_k_c_double, sizeof(__pyx_k_c_double), 0, 0, 1, 1}, + {&__pyx_n_s_c_float, __pyx_k_c_float, sizeof(__pyx_k_c_float), 0, 0, 1, 1}, + {&__pyx_n_s_c_int, __pyx_k_c_int, sizeof(__pyx_k_c_int), 0, 0, 1, 1}, + {&__pyx_n_s_c_int16, __pyx_k_c_int16, sizeof(__pyx_k_c_int16), 0, 0, 1, 1}, + {&__pyx_n_s_c_int32, __pyx_k_c_int32, sizeof(__pyx_k_c_int32), 0, 0, 1, 1}, + {&__pyx_n_s_c_int64, __pyx_k_c_int64, sizeof(__pyx_k_c_int64), 0, 0, 1, 1}, + {&__pyx_n_s_c_int8, __pyx_k_c_int8, sizeof(__pyx_k_c_int8), 0, 0, 1, 1}, + {&__pyx_n_s_c_long, __pyx_k_c_long, sizeof(__pyx_k_c_long), 0, 0, 1, 1}, + {&__pyx_n_s_c_longdouble, __pyx_k_c_longdouble, sizeof(__pyx_k_c_longdouble), 0, 0, 1, 1}, + {&__pyx_n_s_c_longlong, __pyx_k_c_longlong, sizeof(__pyx_k_c_longlong), 0, 0, 1, 1}, + {&__pyx_n_s_c_short, __pyx_k_c_short, sizeof(__pyx_k_c_short), 0, 0, 1, 1}, + {&__pyx_n_s_c_size_t, __pyx_k_c_size_t, sizeof(__pyx_k_c_size_t), 0, 0, 1, 1}, + {&__pyx_n_s_c_ssize_t, __pyx_k_c_ssize_t, sizeof(__pyx_k_c_ssize_t), 0, 0, 1, 1}, + {&__pyx_n_s_c_ubyte, __pyx_k_c_ubyte, sizeof(__pyx_k_c_ubyte), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint, __pyx_k_c_uint, sizeof(__pyx_k_c_uint), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint16, __pyx_k_c_uint16, sizeof(__pyx_k_c_uint16), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint32, __pyx_k_c_uint32, sizeof(__pyx_k_c_uint32), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint64, __pyx_k_c_uint64, sizeof(__pyx_k_c_uint64), 0, 0, 1, 1}, + {&__pyx_n_s_c_uint8, __pyx_k_c_uint8, sizeof(__pyx_k_c_uint8), 0, 0, 1, 1}, + {&__pyx_n_s_c_ulong, __pyx_k_c_ulong, sizeof(__pyx_k_c_ulong), 0, 0, 1, 1}, + {&__pyx_n_s_c_ulonglong, __pyx_k_c_ulonglong, sizeof(__pyx_k_c_ulonglong), 0, 0, 1, 1}, + {&__pyx_n_s_c_ushort, __pyx_k_c_ushort, sizeof(__pyx_k_c_ushort), 0, 0, 1, 1}, + {&__pyx_n_s_c_void_p, __pyx_k_c_void_p, sizeof(__pyx_k_c_void_p), 0, 0, 1, 1}, + {&__pyx_n_s_c_voidp, __pyx_k_c_voidp, sizeof(__pyx_k_c_voidp), 0, 0, 1, 1}, + {&__pyx_n_s_c_wchar, __pyx_k_c_wchar, sizeof(__pyx_k_c_wchar), 0, 0, 1, 1}, + {&__pyx_n_s_c_wchar_p, __pyx_k_c_wchar_p, sizeof(__pyx_k_c_wchar_p), 0, 0, 1, 1}, + {&__pyx_kp_u_ca_pend_event_timeout, __pyx_k_ca_pend_event_timeout, sizeof(__pyx_k_ca_pend_event_timeout), 0, 1, 0, 0}, + {&__pyx_kp_u_ca_pend_io_timeout, __pyx_k_ca_pend_io_timeout, sizeof(__pyx_k_ca_pend_io_timeout), 0, 1, 0, 0}, + {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1}, + {&__pyx_n_s_cacheFlag, __pyx_k_cacheFlag, sizeof(__pyx_k_cacheFlag), 0, 0, 1, 1}, + {&__pyx_n_u_cafe, __pyx_k_cafe, sizeof(__pyx_k_cafe), 0, 1, 0, 1}, + {&__pyx_kp_u_cafeConnectionState, __pyx_k_cafeConnectionState, sizeof(__pyx_k_cafeConnectionState), 0, 1, 0, 0}, + {&__pyx_kp_u_cafeDbrType, __pyx_k_cafeDbrType, sizeof(__pyx_k_cafeDbrType), 0, 1, 0, 0}, + {&__pyx_n_s_cb, __pyx_k_cb, sizeof(__pyx_k_cb), 0, 0, 1, 1}, + {&__pyx_kp_u_channelID_s, __pyx_k_channelID_s, sizeof(__pyx_k_channelID_s), 0, 1, 0, 0}, + {&__pyx_n_s_channelInfo, __pyx_k_channelInfo, sizeof(__pyx_k_channelInfo), 0, 0, 1, 1}, + {&__pyx_n_s_checkForGroupHandle, __pyx_k_checkForGroupHandle, sizeof(__pyx_k_checkForGroupHandle), 0, 0, 1, 1}, + {&__pyx_n_s_checkForHandle, __pyx_k_checkForHandle, sizeof(__pyx_k_checkForHandle), 0, 0, 1, 1}, + {&__pyx_n_s_checkForHandleList, __pyx_k_checkForHandleList, sizeof(__pyx_k_checkForHandleList), 0, 0, 1, 1}, + {&__pyx_n_u_cinit, __pyx_k_cinit, sizeof(__pyx_k_cinit), 0, 1, 0, 1}, + {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, + {&__pyx_kp_u_className_s, __pyx_k_className_s, sizeof(__pyx_k_className_s), 0, 1, 0, 0}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_u_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 1, 0, 1}, + {&__pyx_n_u_closeChannelKeepHandle, __pyx_k_closeChannelKeepHandle, sizeof(__pyx_k_closeChannelKeepHandle), 0, 1, 0, 1}, + {&__pyx_n_u_closeDisconnectedChannelsWithinG, __pyx_k_closeDisconnectedChannelsWithinG, sizeof(__pyx_k_closeDisconnectedChannelsWithinG), 0, 1, 0, 1}, + {&__pyx_n_u_closeHandles, __pyx_k_closeHandles, sizeof(__pyx_k_closeHandles), 0, 1, 0, 1}, + {&__pyx_n_s_cname, __pyx_k_cname, sizeof(__pyx_k_cname), 0, 0, 1, 1}, + {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, + {&__pyx_kp_u_connectFlag_d, __pyx_k_connectFlag_d, sizeof(__pyx_k_connectFlag_d), 0, 1, 0, 0}, + {&__pyx_kp_u_connectionState, __pyx_k_connectionState, sizeof(__pyx_k_connectionState), 0, 1, 0, 0}, + {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0}, + {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0}, + {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, + {&__pyx_n_u_ctype, __pyx_k_ctype, sizeof(__pyx_k_ctype), 0, 1, 0, 1}, + {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1}, + {&__pyx_n_u_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 1, 0, 1}, + {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1}, + {&__pyx_kp_u_d_2, __pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 1, 0, 0}, + {&__pyx_kp_u_dataType, __pyx_k_dataType, sizeof(__pyx_k_dataType), 0, 1, 0, 0}, + {&__pyx_kp_u_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 1, 0, 0}, + {&__pyx_n_s_dbr, __pyx_k_dbr, sizeof(__pyx_k_dbr), 0, 0, 1, 1}, + {&__pyx_n_s_dbrBase, __pyx_k_dbrBase, sizeof(__pyx_k_dbrBase), 0, 0, 1, 1}, + {&__pyx_kp_u_dbrDataType, __pyx_k_dbrDataType, sizeof(__pyx_k_dbrDataType), 0, 1, 0, 0}, + {&__pyx_kp_u_dbr_base_type_should_be_one_of_D, __pyx_k_dbr_base_type_should_be_one_of_D, sizeof(__pyx_k_dbr_base_type_should_be_one_of_D), 0, 1, 0, 0}, + {&__pyx_kp_u_dbr_base_type_should_be_one_of_D_2, __pyx_k_dbr_base_type_should_be_one_of_D_2, sizeof(__pyx_k_dbr_base_type_should_be_one_of_D_2), 0, 1, 0, 0}, + {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, + {&__pyx_kp_u_decode_utf_16_error, __pyx_k_decode_utf_16_error, sizeof(__pyx_k_decode_utf_16_error), 0, 1, 0, 0}, + {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1}, + {&__pyx_kp_u_def_getScalarArray, __pyx_k_def_getScalarArray, sizeof(__pyx_k_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_def_getScalarList, __pyx_k_def_getScalarList, sizeof(__pyx_k_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_n_s_deltaMS, __pyx_k_deltaMS, sizeof(__pyx_k_deltaMS), 0, 0, 1, 1}, + {&__pyx_n_u_devicePositionV, __pyx_k_devicePositionV, sizeof(__pyx_k_devicePositionV), 0, 1, 0, 1}, + {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_n_s_dictFlag, __pyx_k_dictFlag, sizeof(__pyx_k_dictFlag), 0, 0, 1, 1}, + {&__pyx_kp_u_does_not_match_the_length_of_da, __pyx_k_does_not_match_the_length_of_da, sizeof(__pyx_k_does_not_match_the_length_of_da), 0, 1, 0, 0}, + {&__pyx_kp_u_does_not_match_the_length_of_da_2, __pyx_k_does_not_match_the_length_of_da_2, sizeof(__pyx_k_does_not_match_the_length_of_da_2), 0, 1, 0, 0}, + {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1}, + {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 1, 0, 1}, + {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, + {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, + {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1}, + {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1}, + {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, + {&__pyx_kp_u_encode_utf_16_error, __pyx_k_encode_utf_16_error, sizeof(__pyx_k_encode_utf_16_error), 0, 1, 0, 0}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_enumString, __pyx_k_enumString, sizeof(__pyx_k_enumString), 0, 0, 1, 1}, + {&__pyx_kp_u_enumStrings, __pyx_k_enumStrings, sizeof(__pyx_k_enumStrings), 0, 1, 0, 0}, + {&__pyx_n_s_enumValue, __pyx_k_enumValue, sizeof(__pyx_k_enumValue), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, + {&__pyx_n_s_error_code, __pyx_k_error_code, sizeof(__pyx_k_error_code), 0, 0, 1, 1}, + {&__pyx_kp_u_error_code_2, __pyx_k_error_code_2, sizeof(__pyx_k_error_code_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_code_3, __pyx_k_error_code_3, sizeof(__pyx_k_error_code_3), 0, 1, 0, 0}, + {&__pyx_n_s_error_info, __pyx_k_error_info, sizeof(__pyx_k_error_info), 0, 0, 1, 1}, + {&__pyx_kp_u_error_info_2, __pyx_k_error_info_2, sizeof(__pyx_k_error_info_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_info_3, __pyx_k_error_info_3, sizeof(__pyx_k_error_info_3), 0, 1, 0, 0}, + {&__pyx_n_s_error_text, __pyx_k_error_text, sizeof(__pyx_k_error_text), 0, 0, 1, 1}, + {&__pyx_kp_u_error_text_2, __pyx_k_error_text_2, sizeof(__pyx_k_error_text_2), 0, 1, 0, 0}, + {&__pyx_kp_u_error_text_3, __pyx_k_error_text_3, sizeof(__pyx_k_error_text_3), 0, 1, 0, 0}, + {&__pyx_n_u_etNelemToRetrieveFromCache, __pyx_k_etNelemToRetrieveFromCache, sizeof(__pyx_k_etNelemToRetrieveFromCache), 0, 1, 0, 1}, + {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1}, + {&__pyx_n_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 1}, + {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, + {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 1, 0, 1}, + {&__pyx_n_s_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 0, 1, 1}, + {&__pyx_n_u_float16, __pyx_k_float16, sizeof(__pyx_k_float16), 0, 1, 0, 1}, + {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1}, + {&__pyx_n_u_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 1, 0, 1}, + {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, + {&__pyx_n_u_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 1, 0, 1}, + {&__pyx_n_s_float_2, __pyx_k_float_2, sizeof(__pyx_k_float_2), 0, 0, 1, 1}, + {&__pyx_n_u_float_2, __pyx_k_float_2, sizeof(__pyx_k_float_2), 0, 1, 0, 1}, + {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1}, + {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, + {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, + {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, + {&__pyx_kp_u_freeing_ptr, __pyx_k_freeing_ptr, sizeof(__pyx_k_freeing_ptr), 0, 1, 0, 0}, + {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0}, + {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, + {&__pyx_n_s_gHandleName, __pyx_k_gHandleName, sizeof(__pyx_k_gHandleName), 0, 0, 1, 1}, + {&__pyx_n_s_gName, __pyx_k_gName, sizeof(__pyx_k_gName), 0, 0, 1, 1}, + {&__pyx_kp_u_gameSetAndMatch_list_handlePVSet, __pyx_k_gameSetAndMatch_list_handlePVSet, sizeof(__pyx_k_gameSetAndMatch_list_handlePVSet), 0, 1, 0, 0}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_getAlarmStatusSeverity, __pyx_k_getAlarmStatusSeverity, sizeof(__pyx_k_getAlarmStatusSeverity), 0, 0, 1, 1}, + {&__pyx_n_s_getArray, __pyx_k_getArray, sizeof(__pyx_k_getArray), 0, 0, 1, 1}, + {&__pyx_n_u_getArray, __pyx_k_getArray, sizeof(__pyx_k_getArray), 0, 1, 0, 1}, + {&__pyx_n_s_getArrayCache, __pyx_k_getArrayCache, sizeof(__pyx_k_getArrayCache), 0, 0, 1, 1}, + {&__pyx_n_u_getArrayCache, __pyx_k_getArrayCache, sizeof(__pyx_k_getArrayCache), 0, 1, 0, 1}, + {&__pyx_n_u_getAsyn, __pyx_k_getAsyn, sizeof(__pyx_k_getAsyn), 0, 1, 0, 1}, + {&__pyx_n_s_getCache, __pyx_k_getCache, sizeof(__pyx_k_getCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getCache_handlePV_str_dt_native, __pyx_k_getCache_handlePV_str_dt_native, sizeof(__pyx_k_getCache_handlePV_str_dt_native), 0, 1, 0, 0}, + {&__pyx_n_u_getChannelAttribute, __pyx_k_getChannelAttribute, sizeof(__pyx_k_getChannelAttribute), 0, 1, 0, 1}, + {&__pyx_n_u_getChannelDataStore, __pyx_k_getChannelDataStore, sizeof(__pyx_k_getChannelDataStore), 0, 1, 0, 1}, + {&__pyx_n_u_getChannelDevice, __pyx_k_getChannelDevice, sizeof(__pyx_k_getChannelDevice), 0, 1, 0, 1}, + {&__pyx_n_s_getChannelInfo, __pyx_k_getChannelInfo, sizeof(__pyx_k_getChannelInfo), 0, 0, 1, 1}, + {&__pyx_kp_u_getChannelInfo_handlePV, __pyx_k_getChannelInfo_handlePV, sizeof(__pyx_k_getChannelInfo_handlePV), 0, 1, 0, 0}, + {&__pyx_n_s_getCompoundList, __pyx_k_getCompoundList, sizeof(__pyx_k_getCompoundList), 0, 0, 1, 1}, + {&__pyx_kp_u_getCompoundList_handleList_str_d, __pyx_k_getCompoundList_handleList_str_d, sizeof(__pyx_k_getCompoundList_handleList_str_d), 0, 1, 0, 0}, + {&__pyx_n_s_getCompoundPVGroup, __pyx_k_getCompoundPVGroup, sizeof(__pyx_k_getCompoundPVGroup), 0, 0, 1, 1}, + {&__pyx_kp_u_getCompoundPVGroup_ghandleName_s, __pyx_k_getCompoundPVGroup_ghandleName_s, sizeof(__pyx_k_getCompoundPVGroup_ghandleName_s), 0, 1, 0, 0}, + {&__pyx_n_u_getContext, __pyx_k_getContext, sizeof(__pyx_k_getContext), 0, 1, 0, 1}, + {&__pyx_n_s_getCtrlCache, __pyx_k_getCtrlCache, sizeof(__pyx_k_getCtrlCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getCtrlCache_handlePV_str_dt_nat, __pyx_k_getCtrlCache_handlePV_str_dt_nat, sizeof(__pyx_k_getCtrlCache_handlePV_str_dt_nat), 0, 1, 0, 0}, + {&__pyx_kp_u_getCtrl_handlePV_str_dt_native, __pyx_k_getCtrl_handlePV_str_dt_native, sizeof(__pyx_k_getCtrl_handlePV_str_dt_native), 0, 1, 0, 0}, + {&__pyx_n_u_getDataTypeInCallback, __pyx_k_getDataTypeInCallback, sizeof(__pyx_k_getDataTypeInCallback), 0, 1, 0, 1}, + {&__pyx_n_u_getDataTypeNative, __pyx_k_getDataTypeNative, sizeof(__pyx_k_getDataTypeNative), 0, 1, 0, 1}, + {&__pyx_n_u_getDataTypeRequest, __pyx_k_getDataTypeRequest, sizeof(__pyx_k_getDataTypeRequest), 0, 1, 0, 1}, + {&__pyx_n_s_getDbrBase, __pyx_k_getDbrBase, sizeof(__pyx_k_getDbrBase), 0, 0, 1, 1}, + {&__pyx_n_u_getDbrBaseInCallback, __pyx_k_getDbrBaseInCallback, sizeof(__pyx_k_getDbrBaseInCallback), 0, 1, 0, 1}, + {&__pyx_n_u_getDbrDataTypeInCallback, __pyx_k_getDbrDataTypeInCallback, sizeof(__pyx_k_getDbrDataTypeInCallback), 0, 1, 0, 1}, + {&__pyx_n_s_getDescription, __pyx_k_getDescription, sizeof(__pyx_k_getDescription), 0, 0, 1, 1}, + {&__pyx_kp_u_getDictionary_handleList_dt_cach, __pyx_k_getDictionary_handleList_dt_cach, sizeof(__pyx_k_getDictionary_handleList_dt_cach), 0, 1, 0, 0}, + {&__pyx_n_s_getEnumFromString, __pyx_k_getEnumFromString, sizeof(__pyx_k_getEnumFromString), 0, 0, 1, 1}, + {&__pyx_n_u_getEnumFromString, __pyx_k_getEnumFromString, sizeof(__pyx_k_getEnumFromString), 0, 1, 0, 1}, + {&__pyx_n_s_getEnumStrings, __pyx_k_getEnumStrings, sizeof(__pyx_k_getEnumStrings), 0, 0, 1, 1}, + {&__pyx_n_s_getGroup, __pyx_k_getGroup, sizeof(__pyx_k_getGroup), 0, 0, 1, 1}, + {&__pyx_kp_u_getGroupCache_self_ghandleName_s, __pyx_k_getGroupCache_self_ghandleName_s, sizeof(__pyx_k_getGroupCache_self_ghandleName_s), 0, 1, 0, 0}, + {&__pyx_kp_u_getGroup_ghandleName_str_dt_nati, __pyx_k_getGroup_ghandleName_str_dt_nati, sizeof(__pyx_k_getGroup_ghandleName_str_dt_nati), 0, 1, 0, 0}, + {&__pyx_n_s_getHandleFromPV, __pyx_k_getHandleFromPV, sizeof(__pyx_k_getHandleFromPV), 0, 0, 1, 1}, + {&__pyx_n_s_getHandleFromPVName, __pyx_k_getHandleFromPVName, sizeof(__pyx_k_getHandleFromPVName), 0, 0, 1, 1}, + {&__pyx_kp_u_getHandleFromPVWithinGroup_pv_gh, __pyx_k_getHandleFromPVWithinGroup_pv_gh, sizeof(__pyx_k_getHandleFromPVWithinGroup_pv_gh), 0, 1, 0, 0}, + {&__pyx_n_s_getHandlesFromWithinGroup, __pyx_k_getHandlesFromWithinGroup, sizeof(__pyx_k_getHandlesFromWithinGroup), 0, 0, 1, 1}, + {&__pyx_n_u_getHandlesFromWithinGroup, __pyx_k_getHandlesFromWithinGroup, sizeof(__pyx_k_getHandlesFromWithinGroup), 0, 1, 0, 1}, + {&__pyx_n_s_getList, __pyx_k_getList, sizeof(__pyx_k_getList), 0, 0, 1, 1}, + {&__pyx_n_u_getList, __pyx_k_getList, sizeof(__pyx_k_getList), 0, 1, 0, 1}, + {&__pyx_n_u_getMonitorIDInCallback, __pyx_k_getMonitorIDInCallback, sizeof(__pyx_k_getMonitorIDInCallback), 0, 1, 0, 1}, + {&__pyx_n_s_getMonitorIDs, __pyx_k_getMonitorIDs, sizeof(__pyx_k_getMonitorIDs), 0, 0, 1, 1}, + {&__pyx_n_s_getMonitorIDsInWaiting, __pyx_k_getMonitorIDsInWaiting, sizeof(__pyx_k_getMonitorIDsInWaiting), 0, 0, 1, 1}, + {&__pyx_n_s_getNoMonitors, __pyx_k_getNoMonitors, sizeof(__pyx_k_getNoMonitors), 0, 0, 1, 1}, + {&__pyx_n_s_getNonBlocking, __pyx_k_getNonBlocking, sizeof(__pyx_k_getNonBlocking), 0, 0, 1, 1}, + {&__pyx_n_s_getPV, __pyx_k_getPV, sizeof(__pyx_k_getPV), 0, 0, 1, 1}, + {&__pyx_n_u_getPV, __pyx_k_getPV, sizeof(__pyx_k_getPV), 0, 1, 0, 1}, + {&__pyx_n_s_getPVCache, __pyx_k_getPVCache, sizeof(__pyx_k_getPVCache), 0, 0, 1, 1}, + {&__pyx_kp_u_getPVCache_handlePV_str_dt_nativ, __pyx_k_getPVCache_handlePV_str_dt_nativ, sizeof(__pyx_k_getPVCache_handlePV_str_dt_nativ), 0, 1, 0, 0}, + {&__pyx_n_s_getPVGroup, __pyx_k_getPVGroup, sizeof(__pyx_k_getPVGroup), 0, 0, 1, 1}, + {&__pyx_n_u_getPVGroupCache, __pyx_k_getPVGroupCache, sizeof(__pyx_k_getPVGroupCache), 0, 1, 0, 1}, + {&__pyx_kp_u_getPVGroup_ghandleName_str_dt_na, __pyx_k_getPVGroup_ghandleName_str_dt_na, sizeof(__pyx_k_getPVGroup_ghandleName_str_dt_na), 0, 1, 0, 0}, + {&__pyx_n_s_getPVList, __pyx_k_getPVList, sizeof(__pyx_k_getPVList), 0, 0, 1, 1}, + {&__pyx_n_u_getPVList, __pyx_k_getPVList, sizeof(__pyx_k_getPVList), 0, 1, 0, 1}, + {&__pyx_n_s_getPrecision, __pyx_k_getPrecision, sizeof(__pyx_k_getPrecision), 0, 0, 1, 1}, + {&__pyx_kp_u_getScalarArray_handleList_str_dt, __pyx_k_getScalarArray_handleList_str_dt, sizeof(__pyx_k_getScalarArray_handleList_str_dt), 0, 1, 0, 0}, + {&__pyx_n_s_getScalarList, __pyx_k_getScalarList, sizeof(__pyx_k_getScalarList), 0, 0, 1, 1}, + {&__pyx_kp_u_getScalarList_handleList_str_dt, __pyx_k_getScalarList_handleList_str_dt, sizeof(__pyx_k_getScalarList_handleList_str_dt), 0, 1, 0, 0}, + {&__pyx_n_s_getStatus, __pyx_k_getStatus, sizeof(__pyx_k_getStatus), 0, 0, 1, 1}, + {&__pyx_n_s_getStringFromEnum, __pyx_k_getStringFromEnum, sizeof(__pyx_k_getStringFromEnum), 0, 0, 1, 1}, + {&__pyx_n_u_getStringFromEnum, __pyx_k_getStringFromEnum, sizeof(__pyx_k_getStringFromEnum), 0, 1, 0, 1}, + {&__pyx_n_s_getTimeStamp, __pyx_k_getTimeStamp, sizeof(__pyx_k_getTimeStamp), 0, 0, 1, 1}, + {&__pyx_n_s_getTimeStampAsDate, __pyx_k_getTimeStampAsDate, sizeof(__pyx_k_getTimeStampAsDate), 0, 0, 1, 1}, + {&__pyx_n_s_getUnits, __pyx_k_getUnits, sizeof(__pyx_k_getUnits), 0, 0, 1, 1}, + {&__pyx_n_s_getWFAsString, __pyx_k_getWFAsString, sizeof(__pyx_k_getWFAsString), 0, 0, 1, 1}, + {&__pyx_n_u_getWFAsString, __pyx_k_getWFAsString, sizeof(__pyx_k_getWFAsString), 0, 1, 0, 1}, + {&__pyx_kp_u_get_handlePV_dt, __pyx_k_get_handlePV_dt, sizeof(__pyx_k_get_handlePV_dt), 0, 1, 0, 0}, + {&__pyx_n_s_get_wf_express, __pyx_k_get_wf_express, sizeof(__pyx_k_get_wf_express), 0, 0, 1, 1}, + {&__pyx_n_u_get_wf_express, __pyx_k_get_wf_express, sizeof(__pyx_k_get_wf_express), 0, 1, 0, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_ghandleName, __pyx_k_ghandleName, sizeof(__pyx_k_ghandleName), 0, 0, 1, 1}, + {&__pyx_n_s_gname, __pyx_k_gname, sizeof(__pyx_k_gname), 0, 0, 1, 1}, + {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0}, + {&__pyx_kp_u_groupClose_gHandleName, __pyx_k_groupClose_gHandleName, sizeof(__pyx_k_groupClose_gHandleName), 0, 1, 0, 0}, + {&__pyx_n_u_groupDefineFromCollection, __pyx_k_groupDefineFromCollection, sizeof(__pyx_k_groupDefineFromCollection), 0, 1, 0, 1}, + {&__pyx_n_s_groupHandles, __pyx_k_groupHandles, sizeof(__pyx_k_groupHandles), 0, 0, 1, 1}, + {&__pyx_kp_u_groupMemberList_self_str_gname, __pyx_k_groupMemberList_self_str_gname, sizeof(__pyx_k_groupMemberList_self_str_gname), 0, 1, 0, 0}, + {&__pyx_n_s_groupMonitorStart, __pyx_k_groupMonitorStart, sizeof(__pyx_k_groupMonitorStart), 0, 0, 1, 1}, + {&__pyx_kp_u_groupMonitorStartWithCBList_ghan, __pyx_k_groupMonitorStartWithCBList_ghan, sizeof(__pyx_k_groupMonitorStartWithCBList_ghan), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStart_ghandleName_cb, __pyx_k_groupMonitorStart_ghandleName_cb, sizeof(__pyx_k_groupMonitorStart_ghandleName_cb), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStop_ghandleName, __pyx_k_groupMonitorStop_ghandleName, sizeof(__pyx_k_groupMonitorStop_ghandleName), 0, 1, 0, 0}, + {&__pyx_n_s_groupOpen, __pyx_k_groupOpen, sizeof(__pyx_k_groupOpen), 0, 0, 1, 1}, + {&__pyx_kp_u_groupOpen_char_gname, __pyx_k_groupOpen_char_gname, sizeof(__pyx_k_groupOpen_char_gname), 0, 1, 0, 0}, + {&__pyx_kp_u_grouping_char_gname_list__pvlist, __pyx_k_grouping_char_gname_list__pvlist, sizeof(__pyx_k_grouping_char_gname_list__pvlist), 0, 1, 0, 0}, + {&__pyx_n_u_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 1, 0, 1}, + {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1}, + {&__pyx_n_s_handleList, __pyx_k_handleList, sizeof(__pyx_k_handleList), 0, 0, 1, 1}, + {&__pyx_kp_u_handleMatch_list_member_should_b, __pyx_k_handleMatch_list_member_should_b, sizeof(__pyx_k_handleMatch_list_member_should_b), 0, 1, 0, 0}, + {&__pyx_n_s_handlePV, __pyx_k_handlePV, sizeof(__pyx_k_handlePV), 0, 0, 1, 1}, + {&__pyx_n_s_handlePVAction, __pyx_k_handlePVAction, sizeof(__pyx_k_handlePVAction), 0, 0, 1, 1}, + {&__pyx_kp_u_handlePVAction_list_member_shoul, __pyx_k_handlePVAction_list_member_shoul, sizeof(__pyx_k_handlePVAction_list_member_shoul), 0, 1, 0, 0}, + {&__pyx_n_s_handlePVMatch, __pyx_k_handlePVMatch, sizeof(__pyx_k_handlePVMatch), 0, 0, 1, 1}, + {&__pyx_n_s_handlePVSet, __pyx_k_handlePVSet, sizeof(__pyx_k_handlePVSet), 0, 0, 1, 1}, + {&__pyx_kp_u_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 1, 0, 0}, + {&__pyx_kp_u_handle_3, __pyx_k_handle_3, sizeof(__pyx_k_handle_3), 0, 1, 0, 0}, + {&__pyx_n_s_handle_4, __pyx_k_handle_4, sizeof(__pyx_k_handle_4), 0, 0, 1, 1}, + {&__pyx_n_s_handlesPV, __pyx_k_handlesPV, sizeof(__pyx_k_handlesPV), 0, 0, 1, 1}, + {&__pyx_n_u_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 1, 0, 1}, + {&__pyx_n_s_hasAlarmStatusSeverity, __pyx_k_hasAlarmStatusSeverity, sizeof(__pyx_k_hasAlarmStatusSeverity), 0, 0, 1, 1}, + {&__pyx_n_s_hasDescription, __pyx_k_hasDescription, sizeof(__pyx_k_hasDescription), 0, 0, 1, 1}, + {&__pyx_kp_u_has_error, __pyx_k_has_error, sizeof(__pyx_k_has_error), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_DBR_TIME, __pyx_k_hence_assuming_DBR_TIME, sizeof(__pyx_k_hence_assuming_DBR_TIME), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_default_value_GET, __pyx_k_hence_assuming_default_value_GET, sizeof(__pyx_k_hence_assuming_default_value_GET), 0, 1, 0, 0}, + {&__pyx_kp_u_hence_assuming_default_value_GET_2, __pyx_k_hence_assuming_default_value_GET_2, sizeof(__pyx_k_hence_assuming_default_value_GET_2), 0, 1, 0, 0}, + {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1}, + {&__pyx_kp_u_hostName_s, __pyx_k_hostName_s, sizeof(__pyx_k_hostName_s), 0, 1, 0, 0}, + {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_kp_u_in_PyCafe_def_getCompundList, __pyx_k_in_PyCafe_def_getCompundList, sizeof(__pyx_k_in_PyCafe_def_getCompundList), 0, 1, 0, 0}, + {&__pyx_kp_u_in_PyCafe_def_getScalarArray, __pyx_k_in_PyCafe_def_getScalarArray, sizeof(__pyx_k_in_PyCafe_def_getScalarArray), 0, 1, 0, 0}, + {&__pyx_kp_u_in_PyCafe_def_getScalarList, __pyx_k_in_PyCafe_def_getScalarList, sizeof(__pyx_k_in_PyCafe_def_getScalarList), 0, 1, 0, 0}, + {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, + {&__pyx_n_u_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 1, 0, 1}, + {&__pyx_n_s_initCallbackComplete, __pyx_k_initCallbackComplete, sizeof(__pyx_k_initCallbackComplete), 0, 0, 1, 1}, + {&__pyx_n_u_initCallbackComplete, __pyx_k_initCallbackComplete, sizeof(__pyx_k_initCallbackComplete), 0, 1, 0, 1}, + {&__pyx_kp_u_input_argument_timeout_must_be_a, __pyx_k_input_argument_timeout_must_be_a, sizeof(__pyx_k_input_argument_timeout_must_be_a), 0, 1, 0, 0}, + {&__pyx_kp_u_input_argument_timeout_must_be_a_2, __pyx_k_input_argument_timeout_must_be_a_2, sizeof(__pyx_k_input_argument_timeout_must_be_a_2), 0, 1, 0, 0}, + {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, + {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1}, + {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 0, 1, 1}, + {&__pyx_n_u_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 1, 0, 1}, + {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1}, + {&__pyx_n_u_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 1, 0, 1}, + {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1}, + {&__pyx_n_u_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 1, 0, 1}, + {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1}, + {&__pyx_n_u_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 1, 0, 1}, + {&__pyx_n_s_int_2, __pyx_k_int_2, sizeof(__pyx_k_int_2), 0, 0, 1, 1}, + {&__pyx_n_u_int_2, __pyx_k_int_2, sizeof(__pyx_k_int_2), 0, 1, 0, 1}, + {&__pyx_n_s_intc, __pyx_k_intc, sizeof(__pyx_k_intc), 0, 0, 1, 1}, + {&__pyx_n_s_intp, __pyx_k_intp, sizeof(__pyx_k_intp), 0, 0, 1, 1}, + {&__pyx_n_s_isConnected, __pyx_k_isConnected, sizeof(__pyx_k_isConnected), 0, 0, 1, 1}, + {&__pyx_n_u_isConnected, __pyx_k_isConnected, sizeof(__pyx_k_isConnected), 0, 1, 0, 1}, + {&__pyx_n_s_isEnum, __pyx_k_isEnum, sizeof(__pyx_k_isEnum), 0, 0, 1, 1}, + {&__pyx_n_s_isValid, __pyx_k_isValid, sizeof(__pyx_k_isValid), 0, 0, 1, 1}, + {&__pyx_kp_u_is_not_a_valid_option, __pyx_k_is_not_a_valid_option, sizeof(__pyx_k_is_not_a_valid_option), 0, 1, 0, 0}, + {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, + {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0}, + {&__pyx_n_s_keepGroupName, __pyx_k_keepGroupName, sizeof(__pyx_k_keepGroupName), 0, 0, 1, 1}, + {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, + {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_kp_u_latin_1, __pyx_k_latin_1, sizeof(__pyx_k_latin_1), 0, 1, 0, 0}, + {&__pyx_n_s_longlong, __pyx_k_longlong, sizeof(__pyx_k_longlong), 0, 0, 1, 1}, + {&__pyx_kp_u_lowerAlarmLimit_f, __pyx_k_lowerAlarmLimit_f, sizeof(__pyx_k_lowerAlarmLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerControlLimit_f, __pyx_k_lowerControlLimit_f, sizeof(__pyx_k_lowerControlLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerDisplayLimit_f, __pyx_k_lowerDisplayLimit_f, sizeof(__pyx_k_lowerDisplayLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_lowerWarningLimit_f, __pyx_k_lowerWarningLimit_f, sizeof(__pyx_k_lowerWarningLimit_f), 0, 1, 0, 0}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_kp_u_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_ALARM, __pyx_k_maskHasDBE_ALARM, sizeof(__pyx_k_maskHasDBE_ALARM), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_LOG, __pyx_k_maskHasDBE_LOG, sizeof(__pyx_k_maskHasDBE_LOG), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_PROPERTY, __pyx_k_maskHasDBE_PROPERTY, sizeof(__pyx_k_maskHasDBE_PROPERTY), 0, 1, 0, 0}, + {&__pyx_kp_u_maskHasDBE_VALUE, __pyx_k_maskHasDBE_VALUE, sizeof(__pyx_k_maskHasDBE_VALUE), 0, 1, 0, 0}, + {&__pyx_n_s_mask_2, __pyx_k_mask_2, sizeof(__pyx_k_mask_2), 0, 0, 1, 1}, + {&__pyx_kp_u_matchManyWithStatus_list_valSet, __pyx_k_matchManyWithStatus_list_valSet, sizeof(__pyx_k_matchManyWithStatus_list_valSet), 0, 1, 0, 0}, + {&__pyx_kp_u_matchMany_list_valSet_list_handl, __pyx_k_matchMany_list_valSet_list_handl, sizeof(__pyx_k_matchMany_list_valSet_list_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_match_double_valSet_handlePVMatc, __pyx_k_match_double_valSet_handlePVMatc, sizeof(__pyx_k_match_double_valSet_handlePVMatc), 0, 1, 0, 0}, + {&__pyx_kp_u_members_while_group_has, __pyx_k_members_while_group_has, sizeof(__pyx_k_members_while_group_has), 0, 1, 0, 0}, + {&__pyx_n_s_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 0, 1, 1}, + {&__pyx_n_u_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 1, 0, 1}, + {&__pyx_kp_u_memoryview_numpy_array_ctypes, __pyx_k_memoryview_numpy_array_ctypes, sizeof(__pyx_k_memoryview_numpy_array_ctypes), 0, 1, 0, 0}, + {&__pyx_n_u_memoryviewslice, __pyx_k_memoryviewslice, sizeof(__pyx_k_memoryviewslice), 0, 1, 0, 1}, + {&__pyx_n_u_memoryviewslice_2, __pyx_k_memoryviewslice_2, sizeof(__pyx_k_memoryviewslice_2), 0, 1, 0, 1}, + {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, + {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1}, + {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, + {&__pyx_kp_u_monid, __pyx_k_monid, sizeof(__pyx_k_monid), 0, 1, 0, 0}, + {&__pyx_n_s_monid_2, __pyx_k_monid_2, sizeof(__pyx_k_monid_2), 0, 0, 1, 1}, + {&__pyx_n_s_monid_3, __pyx_k_monid_3, sizeof(__pyx_k_monid_3), 0, 0, 1, 1}, + {&__pyx_n_s_monitorStart, __pyx_k_monitorStart, sizeof(__pyx_k_monitorStart), 0, 0, 1, 1}, + {&__pyx_kp_u_monitorStart_handlePV_object_cb, __pyx_k_monitorStart_handlePV_object_cb, sizeof(__pyx_k_monitorStart_handlePV_object_cb), 0, 1, 0, 0}, + {&__pyx_n_s_monitorStop, __pyx_k_monitorStop, sizeof(__pyx_k_monitorStop), 0, 0, 1, 1}, + {&__pyx_kp_u_monitorStopAll, __pyx_k_monitorStopAll, sizeof(__pyx_k_monitorStopAll), 0, 1, 0, 0}, + {&__pyx_kp_u_monitorStop_handlePV_mpid_None, __pyx_k_monitorStop_handlePV_mpid_None, sizeof(__pyx_k_monitorStop_handlePV_mpid_None), 0, 1, 0, 0}, + {&__pyx_n_s_monitorpolicy, __pyx_k_monitorpolicy, sizeof(__pyx_k_monitorpolicy), 0, 0, 1, 1}, + {&__pyx_n_s_mpid, __pyx_k_mpid, sizeof(__pyx_k_mpid), 0, 0, 1, 1}, + {&__pyx_n_u_mv, __pyx_k_mv, sizeof(__pyx_k_mv), 0, 1, 0, 1}, + {&__pyx_kp_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 0}, + {&__pyx_kp_u_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 0}, + {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 0, 0, 1, 1}, + {&__pyx_n_s_name_4, __pyx_k_name_4, sizeof(__pyx_k_name_4), 0, 0, 1, 1}, + {&__pyx_kp_u_nanny_for_ptr, __pyx_k_nanny_for_ptr, sizeof(__pyx_k_nanny_for_ptr), 0, 1, 0, 0}, + {&__pyx_n_u_native, __pyx_k_native, sizeof(__pyx_k_native), 0, 1, 0, 1}, + {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1}, + {&__pyx_n_u_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 1, 0, 1}, + {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, + {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, + {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, + {&__pyx_kp_u_nelem, __pyx_k_nelem, sizeof(__pyx_k_nelem), 0, 1, 0, 0}, + {&__pyx_n_s_nelem_2, __pyx_k_nelem_2, sizeof(__pyx_k_nelem_2), 0, 0, 1, 1}, + {&__pyx_kp_u_nelem_d, __pyx_k_nelem_d, sizeof(__pyx_k_nelem_d), 0, 1, 0, 0}, + {&__pyx_n_s_netrfc, __pyx_k_netrfc, sizeof(__pyx_k_netrfc), 0, 0, 1, 1}, + {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, + {&__pyx_kp_u_noEnumStrings_d, __pyx_k_noEnumStrings_d, sizeof(__pyx_k_noEnumStrings_d), 0, 1, 0, 0}, + {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, + {&__pyx_kp_u_no_encoding_done, __pyx_k_no_encoding_done, sizeof(__pyx_k_no_encoding_done), 0, 1, 0, 0}, + {&__pyx_kp_u_not_connected, __pyx_k_not_connected, sizeof(__pyx_k_not_connected), 0, 1, 0, 0}, + {&__pyx_kp_u_not_recognized, __pyx_k_not_recognized, sizeof(__pyx_k_not_recognized), 0, 1, 0, 0}, + {&__pyx_n_s_notify_milliseconds, __pyx_k_notify_milliseconds, sizeof(__pyx_k_notify_milliseconds), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_u_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 0, 1}, + {&__pyx_kp_u_np_bool, __pyx_k_np_bool, sizeof(__pyx_k_np_bool), 0, 1, 0, 0}, + {&__pyx_kp_u_np_byte, __pyx_k_np_byte, sizeof(__pyx_k_np_byte), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float, __pyx_k_np_float, sizeof(__pyx_k_np_float), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float16, __pyx_k_np_float16, sizeof(__pyx_k_np_float16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float32, __pyx_k_np_float32, sizeof(__pyx_k_np_float32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_float64, __pyx_k_np_float64, sizeof(__pyx_k_np_float64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int, __pyx_k_np_int, sizeof(__pyx_k_np_int), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int16, __pyx_k_np_int16, sizeof(__pyx_k_np_int16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int32, __pyx_k_np_int32, sizeof(__pyx_k_np_int32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int64, __pyx_k_np_int64, sizeof(__pyx_k_np_int64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_int8, __pyx_k_np_int8, sizeof(__pyx_k_np_int8), 0, 1, 0, 0}, + {&__pyx_kp_u_np_intc, __pyx_k_np_intc, sizeof(__pyx_k_np_intc), 0, 1, 0, 0}, + {&__pyx_kp_u_np_long, __pyx_k_np_long, sizeof(__pyx_k_np_long), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ndarray, __pyx_k_np_ndarray, sizeof(__pyx_k_np_ndarray), 0, 1, 0, 0}, + {&__pyx_kp_u_np_short, __pyx_k_np_short, sizeof(__pyx_k_np_short), 0, 1, 0, 0}, + {&__pyx_kp_u_np_str, __pyx_k_np_str, sizeof(__pyx_k_np_str), 0, 1, 0, 0}, + {&__pyx_kp_u_np_str_2, __pyx_k_np_str_2, sizeof(__pyx_k_np_str_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_string, __pyx_k_np_string, sizeof(__pyx_k_np_string), 0, 1, 0, 0}, + {&__pyx_kp_u_np_string_2, __pyx_k_np_string_2, sizeof(__pyx_k_np_string_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint16, __pyx_k_np_uint16, sizeof(__pyx_k_np_uint16), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint32, __pyx_k_np_uint32, sizeof(__pyx_k_np_uint32), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint64, __pyx_k_np_uint64, sizeof(__pyx_k_np_uint64), 0, 1, 0, 0}, + {&__pyx_kp_u_np_uint8, __pyx_k_np_uint8, sizeof(__pyx_k_np_uint8), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ulong, __pyx_k_np_ulong, sizeof(__pyx_k_np_ulong), 0, 1, 0, 0}, + {&__pyx_kp_u_np_unicode, __pyx_k_np_unicode, sizeof(__pyx_k_np_unicode), 0, 1, 0, 0}, + {&__pyx_kp_u_np_unicode_2, __pyx_k_np_unicode_2, sizeof(__pyx_k_np_unicode_2), 0, 1, 0, 0}, + {&__pyx_kp_u_np_ushort, __pyx_k_np_ushort, sizeof(__pyx_k_np_ushort), 0, 1, 0, 0}, + {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_n_u_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 0, 1}, + {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy_ndarray, __pyx_k_numpy_ndarray, sizeof(__pyx_k_numpy_ndarray), 0, 1, 0, 0}, + {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, + {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, + {&__pyx_n_u_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 1, 0, 1}, + {&__pyx_n_u_openGroupNowAndWaitForInputGroup, __pyx_k_openGroupNowAndWaitForInputGroup, sizeof(__pyx_k_openGroupNowAndWaitForInputGroup), 0, 1, 0, 1}, + {&__pyx_n_s_openMonitorNow, __pyx_k_openMonitorNow, sizeof(__pyx_k_openMonitorNow), 0, 0, 1, 1}, + {&__pyx_kp_u_openMonitorNowAndWait_timeout, __pyx_k_openMonitorNowAndWait_timeout, sizeof(__pyx_k_openMonitorNowAndWait_timeout), 0, 1, 0, 0}, + {&__pyx_n_s_openMonitorPrepare, __pyx_k_openMonitorPrepare, sizeof(__pyx_k_openMonitorPrepare), 0, 0, 1, 1}, + {&__pyx_n_s_openNoWait, __pyx_k_openNoWait, sizeof(__pyx_k_openNoWait), 0, 0, 1, 1}, + {&__pyx_n_s_openNowAndWait, __pyx_k_openNowAndWait, sizeof(__pyx_k_openNowAndWait), 0, 0, 1, 1}, + {&__pyx_n_u_openNowAndWait, __pyx_k_openNowAndWait, sizeof(__pyx_k_openNowAndWait), 0, 1, 0, 1}, + {&__pyx_n_s_openPrepare, __pyx_k_openPrepare, sizeof(__pyx_k_openPrepare), 0, 0, 1, 1}, + {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, + {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1}, + {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, + {&__pyx_kp_u_precision_d, __pyx_k_precision_d, sizeof(__pyx_k_precision_d), 0, 1, 0, 0}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_printFlag, __pyx_k_printFlag, sizeof(__pyx_k_printFlag), 0, 0, 1, 1}, + {&__pyx_n_s_printHandle, __pyx_k_printHandle, sizeof(__pyx_k_printHandle), 0, 0, 1, 1}, + {&__pyx_n_u_printHandlesV, __pyx_k_printHandlesV, sizeof(__pyx_k_printHandlesV), 0, 1, 0, 1}, + {&__pyx_n_u_printStatusIfError, __pyx_k_printStatusIfError, sizeof(__pyx_k_printStatusIfError), 0, 1, 0, 1}, + {&__pyx_kp_u_pulseID, __pyx_k_pulseID, sizeof(__pyx_k_pulseID), 0, 1, 0, 0}, + {&__pyx_n_s_pv, __pyx_k_pv, sizeof(__pyx_k_pv), 0, 0, 1, 1}, + {&__pyx_n_s_pvList, __pyx_k_pvList, sizeof(__pyx_k_pvList), 0, 0, 1, 1}, + {&__pyx_n_s_pv_name, __pyx_k_pv_name, sizeof(__pyx_k_pv_name), 0, 0, 1, 1}, + {&__pyx_n_s_pv_name_2, __pyx_k_pv_name_2, sizeof(__pyx_k_pv_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_pv_value, __pyx_k_pv_value, sizeof(__pyx_k_pv_value), 0, 0, 1, 1}, + {&__pyx_n_s_pvctrl, __pyx_k_pvctrl, sizeof(__pyx_k_pvctrl), 0, 0, 1, 1}, + {&__pyx_n_s_pvdata, __pyx_k_pvdata, sizeof(__pyx_k_pvdata), 0, 0, 1, 1}, + {&__pyx_n_s_pvgroup, __pyx_k_pvgroup, sizeof(__pyx_k_pvgroup), 0, 0, 1, 1}, + {&__pyx_n_s_pvhandleList, __pyx_k_pvhandleList, sizeof(__pyx_k_pvhandleList), 0, 0, 1, 1}, + {&__pyx_n_s_pvlist, __pyx_k_pvlist, sizeof(__pyx_k_pvlist), 0, 0, 1, 1}, + {&__pyx_n_s_py_cb, __pyx_k_py_cb, sizeof(__pyx_k_py_cb), 0, 0, 1, 1}, + {&__pyx_kp_u_py_cb_handle_get_wrapper_GET_Ha, __pyx_k_py_cb_handle_get_wrapper_GET_Ha, sizeof(__pyx_k_py_cb_handle_get_wrapper_GET_Ha), 0, 1, 0, 0}, + {&__pyx_n_s_pymodule, __pyx_k_pymodule, sizeof(__pyx_k_pymodule), 0, 0, 1, 1}, + {&__pyx_n_s_pymodule_parts, __pyx_k_pymodule_parts, sizeof(__pyx_k_pymodule_parts), 0, 0, 1, 1}, + {&__pyx_n_s_python_version, __pyx_k_python_version, sizeof(__pyx_k_python_version), 0, 0, 1, 1}, + {&__pyx_kp_u_pyx, __pyx_k_pyx, sizeof(__pyx_k_pyx), 0, 1, 0, 0}, + {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_CafeException, __pyx_k_pyx_unpickle_CafeException, sizeof(__pyx_k_pyx_unpickle_CafeException), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_kp_u_reports_the_following_error, __pyx_k_reports_the_following_error, sizeof(__pyx_k_reports_the_following_error), 0, 1, 0, 0}, + {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, + {&__pyx_n_s_scalarOnly, __pyx_k_scalarOnly, sizeof(__pyx_k_scalarOnly), 0, 0, 1, 1}, + {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, + {&__pyx_kp_s_self_ptr_cannot_be_converted_to, __pyx_k_self_ptr_cannot_be_converted_to, sizeof(__pyx_k_self_ptr_cannot_be_converted_to), 0, 0, 1, 0}, + {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1}, + {&__pyx_kp_u_setAndMatchMany_list_handlePVSet, __pyx_k_setAndMatchMany_list_handlePVSet, sizeof(__pyx_k_setAndMatchMany_list_handlePVSet), 0, 1, 0, 0}, + {&__pyx_kp_u_setAndMatch_handlePVSet_double_v, __pyx_k_setAndMatch_handlePVSet_double_v, sizeof(__pyx_k_setAndMatch_handlePVSet_double_v), 0, 1, 0, 0}, + {&__pyx_n_u_setCallbackGet, __pyx_k_setCallbackGet, sizeof(__pyx_k_setCallbackGet), 0, 1, 0, 1}, + {&__pyx_n_u_setCallbackPut, __pyx_k_setCallbackPut, sizeof(__pyx_k_setCallbackPut), 0, 1, 0, 1}, + {&__pyx_n_u_setChannelRequestPolicyGet, __pyx_k_setChannelRequestPolicyGet, sizeof(__pyx_k_setChannelRequestPolicyGet), 0, 1, 0, 1}, + {&__pyx_kp_u_setCompoundList_handleList_list, __pyx_k_setCompoundList_handleList_list, sizeof(__pyx_k_setCompoundList_handleList_list), 0, 1, 0, 0}, + {&__pyx_n_s_setDbrBase, __pyx_k_setDbrBase, sizeof(__pyx_k_setDbrBase), 0, 0, 1, 1}, + {&__pyx_n_s_setGetActionWhenMonitorPolicy, __pyx_k_setGetActionWhenMonitorPolicy, sizeof(__pyx_k_setGetActionWhenMonitorPolicy), 0, 0, 1, 1}, + {&__pyx_n_s_setGetCacheWaitPolicy, __pyx_k_setGetCacheWaitPolicy, sizeof(__pyx_k_setGetCacheWaitPolicy), 0, 0, 1, 1}, + {&__pyx_kp_u_setGroup_self_ghandleName_list_v, __pyx_k_setGroup_self_ghandleName_list_v, sizeof(__pyx_k_setGroup_self_ghandleName_list_v), 0, 1, 0, 0}, + {&__pyx_n_u_setNelem, __pyx_k_setNelem, sizeof(__pyx_k_setNelem), 0, 1, 0, 1}, + {&__pyx_kp_u_setNelemCtrl_handlePV_unsigned_i, __pyx_k_setNelemCtrl_handlePV_unsigned_i, sizeof(__pyx_k_setNelemCtrl_handlePV_unsigned_i), 0, 1, 0, 0}, + {&__pyx_n_u_setNelemToNative, __pyx_k_setNelemToNative, sizeof(__pyx_k_setNelemToNative), 0, 1, 0, 1}, + {&__pyx_n_u_setNelemToRetrieveFromCacheToOne, __pyx_k_setNelemToRetrieveFromCacheToOne, sizeof(__pyx_k_setNelemToRetrieveFromCacheToOne), 0, 1, 0, 1}, + {&__pyx_n_s_setPyConnectCallbackFn, __pyx_k_setPyConnectCallbackFn, sizeof(__pyx_k_setPyConnectCallbackFn), 0, 0, 1, 1}, + {&__pyx_n_u_setScalarList, __pyx_k_setScalarList, sizeof(__pyx_k_setScalarList), 0, 1, 0, 1}, + {&__pyx_kp_u_set_handlePV_valSet, __pyx_k_set_handlePV_valSet, sizeof(__pyx_k_set_handlePV_valSet), 0, 1, 0, 0}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, + {&__pyx_n_s_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 0, 1, 1}, + {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 1, 0, 1}, + {&__pyx_n_s_showMax, __pyx_k_showMax, sizeof(__pyx_k_showMax), 0, 0, 1, 1}, + {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1}, + {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1}, + {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, + {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1}, + {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, + {&__pyx_kp_u_source_2, __pyx_k_source_2, sizeof(__pyx_k_source_2), 0, 1, 0, 0}, + {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, + {&__pyx_kp_u_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 1, 0, 0}, + {&__pyx_n_s_statusAsString, __pyx_k_statusAsString, sizeof(__pyx_k_statusAsString), 0, 0, 1, 1}, + {&__pyx_n_s_statusList, __pyx_k_statusList, sizeof(__pyx_k_statusList), 0, 0, 1, 1}, + {&__pyx_kp_u_status_2, __pyx_k_status_2, sizeof(__pyx_k_status_2), 0, 1, 0, 0}, + {&__pyx_n_s_status_3, __pyx_k_status_3, sizeof(__pyx_k_status_3), 0, 0, 1, 1}, + {&__pyx_kp_u_status_4, __pyx_k_status_4, sizeof(__pyx_k_status_4), 0, 1, 0, 0}, + {&__pyx_kp_u_status_d, __pyx_k_status_d, sizeof(__pyx_k_status_d), 0, 1, 0, 0}, + {&__pyx_kp_u_status_from_pxy, __pyx_k_status_from_pxy, sizeof(__pyx_k_status_from_pxy), 0, 1, 0, 0}, + {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, + {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, + {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1}, + {&__pyx_n_s_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 0, 1, 1}, + {&__pyx_n_u_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 1, 0, 1}, + {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0}, + {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0}, + {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0}, + {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1}, + {&__pyx_n_u_string_2, __pyx_k_string_2, sizeof(__pyx_k_string_2), 0, 1, 0, 1}, + {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, + {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, + {&__pyx_n_s_supplementHandle, __pyx_k_supplementHandle, sizeof(__pyx_k_supplementHandle), 0, 0, 1, 1}, + {&__pyx_n_u_supplementHandles, __pyx_k_supplementHandles, sizeof(__pyx_k_supplementHandles), 0, 1, 0, 1}, + {&__pyx_n_s_supplementHandlesV, __pyx_k_supplementHandlesV, sizeof(__pyx_k_supplementHandlesV), 0, 0, 1, 1}, + {&__pyx_n_u_supplementHandlesV, __pyx_k_supplementHandlesV, sizeof(__pyx_k_supplementHandlesV), 0, 1, 0, 1}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, + {&__pyx_n_s_timeit, __pyx_k_timeit, sizeof(__pyx_k_timeit), 0, 0, 1, 1}, + {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1}, + {&__pyx_n_s_tolerance, __pyx_k_tolerance, sizeof(__pyx_k_tolerance), 0, 0, 1, 1}, + {&__pyx_kp_u_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 1, 0, 0}, + {&__pyx_kp_u_tsDate, __pyx_k_tsDate, sizeof(__pyx_k_tsDate), 0, 1, 0, 0}, + {&__pyx_n_s_tsDate_2, __pyx_k_tsDate_2, sizeof(__pyx_k_tsDate_2), 0, 0, 1, 1}, + {&__pyx_n_s_ts_2, __pyx_k_ts_2, sizeof(__pyx_k_ts_2), 0, 0, 1, 1}, + {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, + {&__pyx_kp_u_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 1, 0, 0}, + {&__pyx_n_s_type_3, __pyx_k_type_3, sizeof(__pyx_k_type_3), 0, 0, 1, 1}, + {&__pyx_n_s_ubyte, __pyx_k_ubyte, sizeof(__pyx_k_ubyte), 0, 0, 1, 1}, + {&__pyx_n_u_uchar, __pyx_k_uchar, sizeof(__pyx_k_uchar), 0, 1, 0, 1}, + {&__pyx_n_s_uint, __pyx_k_uint, sizeof(__pyx_k_uint), 0, 0, 1, 1}, + {&__pyx_n_u_uint, __pyx_k_uint, sizeof(__pyx_k_uint), 0, 1, 0, 1}, + {&__pyx_n_s_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 0, 1, 1}, + {&__pyx_n_u_uint16, __pyx_k_uint16, sizeof(__pyx_k_uint16), 0, 1, 0, 1}, + {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, + {&__pyx_n_u_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 1, 0, 1}, + {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1}, + {&__pyx_n_u_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 1, 0, 1}, + {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, + {&__pyx_n_u_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 1, 0, 1}, + {&__pyx_n_s_uintc, __pyx_k_uintc, sizeof(__pyx_k_uintc), 0, 0, 1, 1}, + {&__pyx_n_s_uintp, __pyx_k_uintp, sizeof(__pyx_k_uintp), 0, 0, 1, 1}, + {&__pyx_n_s_ulonglong, __pyx_k_ulonglong, sizeof(__pyx_k_ulonglong), 0, 0, 1, 1}, + {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0}, + {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0}, + {&__pyx_n_u_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 1, 0, 1}, + {&__pyx_n_s_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 0, 1, 1}, + {&__pyx_n_u_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 1, 0, 1}, + {&__pyx_kp_u_units_s, __pyx_k_units_s, sizeof(__pyx_k_units_s), 0, 1, 0, 0}, + {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, + {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, + {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_updateMonitorPolicyDeltaMS, __pyx_k_updateMonitorPolicyDeltaMS, sizeof(__pyx_k_updateMonitorPolicyDeltaMS), 0, 0, 1, 1}, + {&__pyx_kp_u_upperAlarmLimit_f, __pyx_k_upperAlarmLimit_f, sizeof(__pyx_k_upperAlarmLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperControlLimit_f, __pyx_k_upperControlLimit_f, sizeof(__pyx_k_upperControlLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperDisplayLimit_f, __pyx_k_upperDisplayLimit_f, sizeof(__pyx_k_upperDisplayLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_upperWarningLimit_f, __pyx_k_upperWarningLimit_f, sizeof(__pyx_k_upperWarningLimit_f), 0, 1, 0, 0}, + {&__pyx_kp_u_userArgs, __pyx_k_userArgs, sizeof(__pyx_k_userArgs), 0, 1, 0, 0}, + {&__pyx_n_s_ushort, __pyx_k_ushort, sizeof(__pyx_k_ushort), 0, 0, 1, 1}, + {&__pyx_n_u_ushort, __pyx_k_ushort, sizeof(__pyx_k_ushort), 0, 1, 0, 1}, + {&__pyx_kp_u_utf_16, __pyx_k_utf_16, sizeof(__pyx_k_utf_16), 0, 1, 0, 0}, + {&__pyx_n_u_utf_16_2, __pyx_k_utf_16_2, sizeof(__pyx_k_utf_16_2), 0, 1, 0, 1}, + {&__pyx_n_u_utf_32, __pyx_k_utf_32, sizeof(__pyx_k_utf_32), 0, 1, 0, 1}, + {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0}, + {&__pyx_n_u_utf_8_2, __pyx_k_utf_8_2, sizeof(__pyx_k_utf_8_2), 0, 1, 0, 1}, + {&__pyx_kp_u_utf_none, __pyx_k_utf_none, sizeof(__pyx_k_utf_none), 0, 1, 0, 0}, + {&__pyx_n_s_valAction, __pyx_k_valAction, sizeof(__pyx_k_valAction), 0, 0, 1, 1}, + {&__pyx_n_s_valList, __pyx_k_valList, sizeof(__pyx_k_valList), 0, 0, 1, 1}, + {&__pyx_n_s_valSet, __pyx_k_valSet, sizeof(__pyx_k_valSet), 0, 0, 1, 1}, + {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0}, + {&__pyx_kp_u_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 1, 0, 0}, + {&__pyx_kp_u_value_3, __pyx_k_value_3, sizeof(__pyx_k_value_3), 0, 1, 0, 0}, + {&__pyx_kp_u_value_4, __pyx_k_value_4, sizeof(__pyx_k_value_4), 0, 1, 0, 0}, + {&__pyx_kp_u_value_5, __pyx_k_value_5, sizeof(__pyx_k_value_5), 0, 1, 0, 0}, + {&__pyx_n_s_value_6, __pyx_k_value_6, sizeof(__pyx_k_value_6), 0, 0, 1, 1}, + {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, + {&__pyx_n_s_vectorList, __pyx_k_vectorList, sizeof(__pyx_k_vectorList), 0, 0, 1, 1}, + {&__pyx_n_s_verify_handlepv, __pyx_k_verify_handlepv, sizeof(__pyx_k_verify_handlepv), 0, 0, 1, 1}, + {&__pyx_n_s_verify_handlepv_locals_wrapper, __pyx_k_verify_handlepv_locals_wrapper, sizeof(__pyx_k_verify_handlepv_locals_wrapper), 0, 0, 1, 1}, + {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, + {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1}, + {&__pyx_kp_u_waitForBundledEvents_self_handle, __pyx_k_waitForBundledEvents_self_handle, sizeof(__pyx_k_waitForBundledEvents_self_handle), 0, 1, 0, 0}, + {&__pyx_n_s_waitForGetEvent, __pyx_k_waitForGetEvent, sizeof(__pyx_k_waitForGetEvent), 0, 0, 1, 1}, + {&__pyx_n_u_waveform, __pyx_k_waveform, sizeof(__pyx_k_waveform), 0, 1, 0, 1}, + {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1}, + {&__pyx_kp_u_while_list_of_callback_objects, __pyx_k_while_list_of_callback_objects, sizeof(__pyx_k_while_list_of_callback_objects), 0, 1, 0, 0}, + {&__pyx_n_s_widget, __pyx_k_widget, sizeof(__pyx_k_widget), 0, 0, 1, 1}, + {&__pyx_kp_u_with_error_status, __pyx_k_with_error_status, sizeof(__pyx_k_with_error_status), 0, 1, 0, 0}, + {&__pyx_n_s_wmpk, __pyx_k_wmpk, sizeof(__pyx_k_wmpk), 0, 0, 1, 1}, + {&__pyx_n_s_wpk, __pyx_k_wpk, sizeof(__pyx_k_wpk), 0, 0, 1, 1}, + {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1}, + {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(2, 697, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 814, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(2, 1126, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_builtin_UserWarning = __Pyx_GetBuiltinName(__pyx_n_s_UserWarning); if (!__pyx_builtin_UserWarning) __PYX_ERR(0, 766, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 7286, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(4, 1038, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 400, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 609, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 828, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_self_ptr_cannot_be_converted_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "(tree fragment)":4 + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("self.ptr cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_ptr_cannot_be_converted_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "PyCafeDefs.pxi":776 + * self.alarmSeverity = -1 + * self.precision = 0 + * self.units = str("") #(< bytes > ("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings = 0 + * self.enumStrings = [] + */ + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u__5); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "PyCafeDefs.pxi":811 + * print("value =", self.value[0], end="" ) + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_value_3); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "PyCafeDefs.pxi":827 + * if self.noEnumStrings > 0: + * print("noEnumStrings = %d" % self.noEnumStrings) + * print("enumStrings =", end=" ") # end for same line # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print(self.enumStrings[i], "[%s]" % i, end=" ") + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_enumStrings); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + + /* "PyCafeDefs.pxi":868 + * + * def show(self): + * print("------CafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if self.type is not None: + * print(self.type) + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_CafeException); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "PyCafeDefs.pxi":887 + * else: + * print("error_info:", self.error_info) + * print("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u__17); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + + /* "PyCafeDefs.pxi":1015 + * print("") + * else: + * print("value = ", end="") # <<<<<<<<<<<<<< + * + * if isinstance(self.value[0], list): + */ + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_value_5); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 1015, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + + /* "PyCafeDefs.pxi":1068 + * def showWithPV(self, glist): + * if len(glist) != self.npv: + * print("ERROR: GROUP MEMBER MISMATCH!!") # <<<<<<<<<<<<<< + * print(glist, "has", len(glist), + * "members while group has", self.npv, "!!") + */ + __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 1068, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__24); + __Pyx_GIVEREF(__pyx_tuple__24); + + /* "PyCafeDefs.pxi":1096 + * print("PV =", grouplist[i]) + * + * print("value = ", end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print(self.pvdata[i].value[j], "[%d]" % j, end=" ") + */ + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_value); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + + /* "PyCafeDefs.pxi":1112 + * self.pvdata[i].tsDate[2], self.pvdata[i].tsDate[3], + * self.pvdata[i].tsDate[4], self.pvdata[i].tsDate[5], self.pvdata[i].tsDate[6]) + * print("--------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u__28); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(2, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + + /* "PyCafeDefs.pxi":1187 + * dtcheck = dtn # need a line here + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") # <<<<<<<<<<<<<< + * print("Data to be presented in native data type") + * + */ + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Valid_input_parameters_for_data); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + + /* "PyCafeDefs.pxi":1188 + * else: + * print("Valid input parameters for data type are variations of: 'int', 'float', 'str', or 'native'") + * print("Data to be presented in native data type") # <<<<<<<<<<<<<< + * + * return dtcheck + */ + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Data_to_be_presented_in_native_d); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 1188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + + /* "PyCafe.pyx":110 + * #while the below is not + * + * def wrapper(self, *args,**kwargs): # <<<<<<<<<<<<<< + * + * #print('The positional arguments are', args) + */ + __pyx_tuple__34 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_handlePV, __pyx_n_s_handle_4); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyCafe_pyx, __pyx_n_s_wrapper, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 110, __pyx_L1_error) + + /* "PyCafe.pyx":217 + * + * if self._c_cafe is NULL: + * raise MemoryError("Failed to instantiate CAFE()") # <<<<<<<<<<<<<< + * + * self.cs = self._c_cafe.getCafeStatus() + */ + __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Failed_to_instantiate_CAFE); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); + + /* "PyCafe.pyx":241 + * + * + * print("PY_VERSION_HEX is ", hex(PY_VERSION_HEX)) # <<<<<<<<<<<<<< + * + * IF PY_EXT_C: + */ + __pyx_tuple__37 = PyTuple_Pack(1, __pyx_int_50792432); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + + /* "PyCafe.pyx":244 + * + * IF PY_EXT_C: + * print("USING PUBLIC PyCafe.h INTERFACE FOR CALLBACKS") # <<<<<<<<<<<<<< + * ELSE: + * print("USING API PyCafe_api.h INTERFACE FOR CALLBACKS") + */ + __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_USING_PUBLIC_PyCafe_h_INTERFACE); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + + /* "PyCafe.pyx":261 + * @verify_handlepv + * def get_wf_express(self, handlePV, nelem): + * print("get_wf_express") # <<<<<<<<<<<<<< + * + * #''' + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_u_get_wf_express); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + + /* "PyCafe.pyx":1786 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def getChannelDataStore") + * + */ + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1786, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + + /* "PyCafe.pyx":1973 + * # Print Warning Message + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") # <<<<<<<<<<<<<< + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + */ + __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); + + /* "PyCafe.pyx":1974 + * if dbrBase > DBR_TIME: + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") # <<<<<<<<<<<<<< + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + */ + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Allowed_DBR_TYPEs_are); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + + /* "PyCafe.pyx":1975 + * print("WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)") + * print("Allowed DBR_TYPEs are:") + * print("DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)") # <<<<<<<<<<<<<< + * print("The value entered was", dbrBase, "hence assuming DBR_TIME") + * dbrBase = DBR_TIME + */ + __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_DBR_PLAIN_0_DBR_STS_1_DBR_TIME_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__50); + __Pyx_GIVEREF(__pyx_tuple__50); + + /* "PyCafe.pyx":2000 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + */ + __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + + /* "PyCafe.pyx":2003 + * ("WARNING: PyCafe def setGetCacheWaitPolicy(" + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") # <<<<<<<<<<<<<< + * print( + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + */ + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetCacheWaitPolic); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 2003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + + /* "PyCafe.pyx":2004 + * "handle/PV, ChannelGetCacheWaitPolicyKind)")) + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * ("GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1)," + * "GET_CACHE_WAIT (2)")) + */ + __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 2004, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + + /* "PyCafe.pyx":2025 + * # Print Warning Message + * if wpk > GET_CACHE_WAIT: + * print( # <<<<<<<<<<<<<< + * "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles( \ + * ChannelGetCacheWaitPolicyKind)") + */ + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 2025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); + + /* "PyCafe.pyx":2029 + * ChannelGetCacheWaitPolicyKind)") + * print("Allowed ChannelGetCacheWaitPolicyKind are:") + * print( # <<<<<<<<<<<<<< + * "GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), \ + * GET_CACHE_WAIT (2)") + */ + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_GET_CACHE_NO_CHECK_0_GET_CACHE_N_2); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + + /* "PyCafe.pyx":2051 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 2051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + + /* "PyCafe.pyx":2052 + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") # <<<<<<<<<<<<<< + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") + * print("The value entered was", wmpk, + */ + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetActionWhenMoni); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 2052, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + + /* "PyCafe.pyx":2053 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicy") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print("GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print("The value entered was", wmpk, + * "hence assuming default value GET_FROM_IOC") + */ + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 2053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + + /* "PyCafe.pyx":2071 + * # Print Warning Message + * if wmpk > GET_FROM_IOC: + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") # <<<<<<<<<<<<<< + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") + */ + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 2071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + + /* "PyCafe.pyx":2073 + * print("WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles") + * print("Allowed ChannelGetActionWhenMonitorPolicyKind are:") + * print(" GET_FROM_CACHE (0), GET_FROM_IOC (1)") # <<<<<<<<<<<<<< + * print( + * "The value entered was", wmpk, + */ + __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_GET_FROM_CACHE_0_GET_FROM_IOC_1_2); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 2073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + + /* "PyCafe.pyx":2262 + * return self.valInt + * else: + * print("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_get_shou); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 2262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + + /* "PyCafe.pyx":2540 + * return None + * else: + * print("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getAsLis); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 2540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + + /* "PyCafe.pyx":2789 + * + * elif art in ['array', 'array.array']: + * print( # <<<<<<<<<<<<<< + * "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list") + * # RETURNING LIST - DOES NOT SUPPORT array of strings; + */ + __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_pyx_getArray_array_type_d); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 2789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + + /* "PyCafe.pyx":2810 + * print("Unknown array type in user request for art='", + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") # <<<<<<<<<<<<<< + * print("Returning memoryview") + * mvStr = np.empty(nelemMethod, dtype=( + */ + __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 2810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + + /* "PyCafe.pyx":2811 + * art, "'. Possible types are:") + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=( + * np.str_, 40), order='C') + */ + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 2811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + + /* "PyCafe.pyx":2904 + * + * elif art in ['array', 'array.array']: + * a = array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append( < short > ui8val[ij]) + */ + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 2904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + + /* "PyCafe.pyx":3159 + * elif art in ['array', 'array.array']: + * + * a = array.array('f') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_u_f); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 3159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + + /* "PyCafe.pyx":3241 + * + * elif art in ['array', 'array.array']: + * a = array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * a.append(dval[ij]) + */ + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_u_d); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 3241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + + /* "PyCafe.pyx":3663 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_Error_Warning_from_def_getAsyn); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 3663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + + /* "PyCafe.pyx":3695 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 3695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__70); + __Pyx_GIVEREF(__pyx_tuple__70); + + /* "PyCafe.pyx":3701 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 3701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + + /* "PyCafe.pyx":3718 + * if (status != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def waitForBundledEvents: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * return status + */ + __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_waitForBundledEvent); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 3718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); + + /* "PyCafe.pyx":3735 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 3735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + + /* "PyCafe.pyx":3741 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarArray. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 3741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + + /* "PyCafe.pyx":3792 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarArray: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getScalarArray); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 3792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + + /* "PyCafe.pyx":4016 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarArray:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_def_getScalarArray); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 4016, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + + /* "PyCafe.pyx":4061 + * + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + + /* "PyCafe.pyx":4067 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); + + /* "PyCafe.pyx":4133 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getScalarList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getScalarList); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + + /* "PyCafe.pyx":4359 + * localList.append(0) + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_HIGH: + * print("def getScalarList:") # <<<<<<<<<<<<<< + * print("Entering 0 for element", i, + * "as channel is not connected!") + */ + __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_def_getScalarList); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 4359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__80); + __Pyx_GIVEREF(__pyx_tuple__80); + + /* "PyCafe.pyx":4388 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getDictionary. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + + /* "PyCafe.pyx":4394 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__82); + __Pyx_GIVEREF(__pyx_tuple__82); + + /* "PyCafe.pyx":4401 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + + /* "PyCafe.pyx":4427 + * handleList = self.getHandlesFromWithinGroup(handleList) + * if not handleList: + * raise Exception(("EXCEPTION RAISED IN PyCafe def getCompoundList. \n" + # <<<<<<<<<<<<<< + * "First input argument should be " + + * "of handles or PVs\nelse for " + + */ + __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 4427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__84); + __Pyx_GIVEREF(__pyx_tuple__84); + + /* "PyCafe.pyx":4482 + * if (statusBundle != ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * print("Error in def getCompoundList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getCompoundList); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + + /* "PyCafe.pyx":4725 + * else: + * + * raise Exception("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if group handle, else if group name") + * + */ + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); + + /* "PyCafe.pyx":4833 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + + /* "PyCafe.pyx":4939 + * status = self.hh.getStatus(handle) + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") # <<<<<<<<<<<<<< + * print("Datatype unknown, returning value 0") + * return 0 + */ + __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getCache); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); + + /* "PyCafe.pyx":4940 + * if status == ICAFE_NORMAL: + * print("This line in PyCafe def getCache should never appear!") + * print("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_Datatype_unknown_returning_value); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + + /* "PyCafe.pyx":5566 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 5566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__90); + __Pyx_GIVEREF(__pyx_tuple__90); + + /* "PyCafe.pyx":5612 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 5612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + + /* "PyCafe.pyx":5658 + * handle = self.checkForHandle(handlePV) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_13); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 5658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__92); + __Pyx_GIVEREF(__pyx_tuple__92); + + /* "PyCafe.pyx":5739 + * handle = self.checkForHandle(handlePV, force=True) + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \n\ # <<<<<<<<<<<<<< + * First input argument, should be of type if handle, else if PV") + * + */ + __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_14); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 5739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + + /* "PyCafe.pyx":5800 + * print( + * "***Warning*** from groupMonitorStart for handle(orPV)=", ghandleName) + * print( # <<<<<<<<<<<<<< + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 5800, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__98); + __Pyx_GIVEREF(__pyx_tuple__98); + + /* "PyCafe.pyx":5802 + * print( + * "dbr base type should be one of DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") # <<<<<<<<<<<<<< + * dbr = DBR_TIME + * + */ + __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u_Assuming_DBR_TIME); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 5802, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + + /* "PyCafe.pyx":5893 + * + * if not isinstance(cb, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * Input cb should be of type and give the list of cb objects") + * + */ + __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_15); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__102); + __Pyx_GIVEREF(__pyx_tuple__102); + + /* "PyCafe.pyx":5908 + * print("No of group members is ", pvg.getNPV(), + * " while list of callback objects is", len(cb)) + * raise Exception("EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \n\ # <<<<<<<<<<<<<< + * No of group members doe not match the length of callback object list") + * + */ + __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_16); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 5908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + + /* "PyCafe.pyx":6018 + * + * if status == ECA_TIMEOUT: + * print("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") + */ + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u__104); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 6018, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + + /* "PyCafe.pyx":6020 + * print("======================================================") + * self._c_cafe.printStatusMessage(status) + * print("TIMEOUT in getGroup; switching to getCompoundList") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_switching_to); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 6020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__106); + __Pyx_GIVEREF(__pyx_tuple__106); + + /* "PyCafe.pyx":6373 + * if status == ECA_TIMEOUT: + * print("======================================================") + * print("TIMEOUT in getGroup; swithing to getCompoundPVGroup") # <<<<<<<<<<<<<< + * print("======================================================") + * return self.getCompoundPVGroup(ghandle, dt) + */ + __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_swithing_to); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 6373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); + + /* "PyCafe.pyx":6426 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print("==============" ) # <<<<<<<<<<<<<< + * print(_METHOD) + * pvg.showMax(1) + */ + __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_u__108); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 6426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__109); + __Pyx_GIVEREF(__pyx_tuple__109); + + /* "PyCafe.pyx":6551 + * print("Error in def grouping for group named", _gname) + * self._c_cafe.printStatusMessage(status) + * print("Analysing statusList[]...") # <<<<<<<<<<<<<< + * for i in range(0, len(statusList)): + * if statusList[i] != ICAFE_NORMAL: + */ + __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_u_Analysing_statusList); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 6551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__110); + __Pyx_GIVEREF(__pyx_tuple__110); + + /* "PyCafe.pyx":6787 + * else: + * print("***Warning*** from monitorStart for handle=", handlePV) + * print("dbr base type should be one of \ # <<<<<<<<<<<<<< + * DBR_PLAIN, DBR_STS, DBR_TIME, DBR_GR, DBR_CTRL") + * print("Assuming DBR_TIME") + */ + __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D_2); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 6787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); + + /* "PyCafe.pyx":6863 + * del hmd[l] + * else: + * raise Exception("EXCEPTION RAISED IN PyCafe def monitorStop. \n \ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be of type ") + * else: + */ + __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 6863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__118); + __Pyx_GIVEREF(__pyx_tuple__118); + + /* "PyCafe.pyx":7012 + * # print('OK for memoryview') + * + * if _python_version > (2,6): # <<<<<<<<<<<<<< + * #if ((_python_version[0] > 2) or (_python_version[0] == 2 and _python_version[1] > 6)): + * + */ + __pyx_tuple__119 = PyTuple_Pack(2, __pyx_int_2, __pyx_int_6); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 7012, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__119); + __Pyx_GIVEREF(__pyx_tuple__119); + + /* "PyCafe.pyx":7284 + * encoding = True + * except UnicodeDecodeError: + * print('decode utf_16 error') # <<<<<<<<<<<<<< + * pass + * except UnicodeEncodeError as ex: + */ + __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_u_decode_utf_16_error); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 7284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__120); + __Pyx_GIVEREF(__pyx_tuple__120); + + /* "PyCafe.pyx":7290 + * pass + * if not encoding: + * print('no encoding done') # <<<<<<<<<<<<<< + * valSetS = valSet + * with nogil: + */ + __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_u_no_encoding_done); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 7290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__121); + __Pyx_GIVEREF(__pyx_tuple__121); + + /* "PyCafe.pyx":7300 + * status = self._c_cafe.setString(handle, valSetS) + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") # <<<<<<<<<<<<<< + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of of type , or ") + */ + __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 7300, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__122); + __Pyx_GIVEREF(__pyx_tuple__122); + + /* "PyCafe.pyx":7301 + * else: + * print("PyCafe def set WARNING: DATA TYPE NOT SUPPORTED") + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ # <<<<<<<<<<<<<< + * or not) should be of of type , or ") + * type(valSet) + */ + __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_Input_data_whether_within_a_list); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 7301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__123); + __Pyx_GIVEREF(__pyx_tuple__123); + + /* "PyCafe.pyx":7330 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type \ + * if handles or if PVs") + */ + __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 7330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__124); + __Pyx_GIVEREF(__pyx_tuple__124); + + /* "PyCafe.pyx":7376 + * pvd[i].setInt(valList[i]) + * else: + * print("This line in PyCafe def setScalarList should never appear!") # <<<<<<<<<<<<<< + * + * cdef int status = ICAFE_NORMAL + */ + __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setScala); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 7376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__125); + __Pyx_GIVEREF(__pyx_tuple__125); + + /* "PyCafe.pyx":7418 + * else: + * if not isinstance(handleList, (list)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 7418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__126); + __Pyx_GIVEREF(__pyx_tuple__126); + + /* "PyCafe.pyx":7424 + * handleList = self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be a 'list' of of type if handles or if PVs") + * + */ + __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 7424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__127); + __Pyx_GIVEREF(__pyx_tuple__127); + + /* "PyCafe.pyx":7483 + * + * else: + * print("This line in PyCafe def setCompoundList should never appear!") # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ + * Unknown data input; should be one of of type , , , ") + */ + __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setCompo); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 7483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__128); + __Pyx_GIVEREF(__pyx_tuple__128); + + /* "PyCafe.pyx":7484 + * else: + * print("This line in PyCafe def setCompoundList should never appear!") + * raise Exception("EXCEPTION RAISED IN PyCafe def setCompoundList. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 7484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__129); + __Pyx_GIVEREF(__pyx_tuple__129); + + /* "PyCafe.pyx":7582 + * print("PyCafe def setGroup: Unusual data type for element", + * i, " : ", type(vectorList[i])) + * raise Exception("EXCEPTION RAISED IN PyCafe def setGroup. \n\ # <<<<<<<<<<<<<< + * Unknown data input; should be one of of type , , , ") + * + */ + __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 7582, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__131); + __Pyx_GIVEREF(__pyx_tuple__131); + + /* "PyCafe.pyx":7622 + * + * if (len(handlePVSet) != len(valSet)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and second (valSet) input lists must match!") + * + */ + __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 7622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__132); + __Pyx_GIVEREF(__pyx_tuple__132); + + /* "PyCafe.pyx":7626 + * + * if (len(handlePVSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 7626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); + + /* "PyCafe.pyx":7824 + * + * if (len(valSet) != len(handlePVMatch)): + * raise Exception("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Lengths of first (handlePVSet) and third (handlePVMatch) input lists must match!") + * + */ + __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 7824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__134); + __Pyx_GIVEREF(__pyx_tuple__134); + + /* "PyCafe.pyx":8048 + * if PYCAFE_PRINT_LEVEL >= PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception( # <<<<<<<<<<<<<< + * "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") + * + */ + __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 8048, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__135); + __Pyx_GIVEREF(__pyx_tuple__135); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__136); + __Pyx_GIVEREF(__pyx_tuple__136); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(4, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__138); + __Pyx_GIVEREF(__pyx_tuple__138); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(4, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__139); + __Pyx_GIVEREF(__pyx_tuple__139); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(4, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__140); + __Pyx_GIVEREF(__pyx_tuple__140); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(4, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__141); + __Pyx_GIVEREF(__pyx_tuple__141); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(4, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__142); + __Pyx_GIVEREF(__pyx_tuple__142); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + * _import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(4, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__143); + __Pyx_GIVEREF(__pyx_tuple__143); + + /* "../../../../../../../opt/gfa/python-3.7/2018.12/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(4, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__144); + __Pyx_GIVEREF(__pyx_tuple__144); + + /* "View.MemoryView":133 + * + * if not self.ndim: + * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< + * + * if itemsize <= 0: + */ + __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__145); + __Pyx_GIVEREF(__pyx_tuple__145); + + /* "View.MemoryView":136 + * + * if itemsize <= 0: + * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): + */ + __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__146); + __Pyx_GIVEREF(__pyx_tuple__146); + + /* "View.MemoryView":148 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__147); + __Pyx_GIVEREF(__pyx_tuple__147); + + /* "View.MemoryView":176 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__148); + __Pyx_GIVEREF(__pyx_tuple__148); + + /* "View.MemoryView":192 + * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + * if not (flags & bufmode): + * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<< + * info.buf = self.data + * info.len = self.len + */ + __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__149); + __Pyx_GIVEREF(__pyx_tuple__149); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__150 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__150); + __Pyx_GIVEREF(__pyx_tuple__150); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__151); + __Pyx_GIVEREF(__pyx_tuple__151); + + /* "View.MemoryView":414 + * def __setitem__(memoryview self, object index, object value): + * if self.view.readonly: + * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<< + * + * have_slices, index = _unellipsify(index, self.view.ndim) + */ + __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(1, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__152); + __Pyx_GIVEREF(__pyx_tuple__152); + + /* "View.MemoryView":491 + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<< + * else: + * if len(self.view.format) == 1: + */ + __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(1, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__153); + __Pyx_GIVEREF(__pyx_tuple__153); + + /* "View.MemoryView":516 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_WRITABLE and self.view.readonly: + * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<< + * + * if flags & PyBUF_ND: + */ + __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__154); + __Pyx_GIVEREF(__pyx_tuple__154); + + /* "View.MemoryView":566 + * if self.view.strides == NULL: + * + * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<< + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + */ + __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(1, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__155); + __Pyx_GIVEREF(__pyx_tuple__155); + + /* "View.MemoryView":573 + * def suboffsets(self): + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim # <<<<<<<<<<<<<< + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + */ + __pyx_tuple__156 = PyTuple_New(1); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__156); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_tuple__156, 0, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_tuple__156); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__157); + __Pyx_GIVEREF(__pyx_tuple__157); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__158 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__158); + __Pyx_GIVEREF(__pyx_tuple__158); + + /* "View.MemoryView":678 + * if item is Ellipsis: + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * else: + */ + __pyx_slice__159 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__159)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__159); + __Pyx_GIVEREF(__pyx_slice__159); + + /* "View.MemoryView":699 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__160); + __Pyx_GIVEREF(__pyx_tuple__160); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__162 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__162); + __Pyx_GIVEREF(__pyx_tuple__162); + + /* "PyCafe.pyx":48 + * + * _pymodule = "PyCafe.pyx" + * _pymodule_parts = _pymodule.split(".") # <<<<<<<<<<<<<< + * _appname = _pymodule_parts[0] + * + */ + __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_u__163); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__164); + __Pyx_GIVEREF(__pyx_tuple__164); + + /* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + __pyx_tuple__165 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_wrapper, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__165); + __Pyx_GIVEREF(__pyx_tuple__165); + __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyCafe_pyx, __pyx_n_s_verify_handlepv, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 88, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__167 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__167); + __Pyx_GIVEREF(__pyx_tuple__167); + __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CafeException, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(1, 1, __pyx_L1_error) + + /* "View.MemoryView":286 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") + */ + __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__169); + __Pyx_GIVEREF(__pyx_tuple__169); + + /* "View.MemoryView":287 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(1, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__170); + __Pyx_GIVEREF(__pyx_tuple__170); + + /* "View.MemoryView":288 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(1, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__171); + __Pyx_GIVEREF(__pyx_tuple__171); + + /* "View.MemoryView":291 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(1, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__172); + __Pyx_GIVEREF(__pyx_tuple__172); + + /* "View.MemoryView":292 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(1, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__173); + __Pyx_GIVEREF(__pyx_tuple__173); + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_tuple__174 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__174); + __Pyx_GIVEREF(__pyx_tuple__174); + __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; + __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_2 = PyFloat_FromDouble(0.2); if (unlikely(!__pyx_float_0_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_02 = PyFloat_FromDouble(0.02); if (unlikely(!__pyx_float_0_02)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_05 = PyFloat_FromDouble(0.05); if (unlikely(!__pyx_float_0_05)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_001 = PyFloat_FromDouble(0.001); if (unlikely(!__pyx_float_0_001)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_50792432 = PyInt_FromLong(50792432L); if (unlikely(!__pyx_int_50792432)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_145648516 = PyInt_FromLong(145648516L); if (unlikely(!__pyx_int_145648516)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_6PyCafe_hmd = ((PyObject*)Py_None); Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_handle = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_handle_open = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_cbobjt = Py_None; Py_INCREF(Py_None); + generic = Py_None; Py_INCREF(Py_None); + strided = Py_None; Py_INCREF(Py_None); + indirect = Py_None; Py_INCREF(Py_None); + contiguous = Py_None; Py_INCREF(Py_None); + indirect_contiguous = Py_None; Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __pyx_vtabptr_6PyCafe_MemoryNanny = &__pyx_vtable_6PyCafe_MemoryNanny; + __pyx_vtable_6PyCafe_MemoryNanny.create = (PyObject *(*)(void *))__pyx_f_6PyCafe_11MemoryNanny_create; + if (PyType_Ready(&__pyx_type_6PyCafe_MemoryNanny) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_type_6PyCafe_MemoryNanny.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_MemoryNanny.tp_dictoffset && __pyx_type_6PyCafe_MemoryNanny.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_MemoryNanny.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_MemoryNanny.tp_dict, __pyx_vtabptr_6PyCafe_MemoryNanny) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MemoryNanny, (PyObject *)&__pyx_type_6PyCafe_MemoryNanny) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_MemoryNanny) < 0) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_ptype_6PyCafe_MemoryNanny = &__pyx_type_6PyCafe_MemoryNanny; + if (PyType_Ready(&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 35, __pyx_L1_error) + __pyx_type_6PyCafe_CyCa.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CyCa.tp_dictoffset && __pyx_type_6PyCafe_CyCa.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CyCa.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyCa, (PyObject *)&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 35, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CyCa) < 0) __PYX_ERR(2, 35, __pyx_L1_error) + __pyx_ptype_6PyCafe_CyCa = &__pyx_type_6PyCafe_CyCa; + if (PyType_Ready(&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 662, __pyx_L1_error) + __pyx_type_6PyCafe_channelInfo.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_channelInfo.tp_dictoffset && __pyx_type_6PyCafe_channelInfo.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_channelInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_channelInfo, (PyObject *)&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 662, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_channelInfo) < 0) __PYX_ERR(2, 662, __pyx_L1_error) + __pyx_ptype_6PyCafe_channelInfo = &__pyx_type_6PyCafe_channelInfo; + __pyx_vtabptr_6PyCafe_pvctrl = &__pyx_vtable_6PyCafe_pvctrl; + __pyx_vtable_6PyCafe_pvctrl.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvctrl *, PyObject *))__pyx_f_6PyCafe_6pvctrl_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 752, __pyx_L1_error) + __pyx_type_6PyCafe_pvctrl.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvctrl.tp_dictoffset && __pyx_type_6PyCafe_pvctrl.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvctrl.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvctrl.tp_dict, __pyx_vtabptr_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 752, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvctrl, (PyObject *)&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 752, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvctrl) < 0) __PYX_ERR(2, 752, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvctrl = &__pyx_type_6PyCafe_pvctrl; + __pyx_type_6PyCafe_CafeException.tp_base = (&((PyTypeObject*)PyExc_Exception)[0]); + if (PyType_Ready(&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 846, __pyx_L1_error) + __pyx_type_6PyCafe_CafeException.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CafeException.tp_dictoffset && __pyx_type_6PyCafe_CafeException.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CafeException.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CafeException_2, (PyObject *)&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 846, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CafeException) < 0) __PYX_ERR(2, 846, __pyx_L1_error) + __pyx_ptype_6PyCafe_CafeException = &__pyx_type_6PyCafe_CafeException; + if (PyType_Ready(&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 908, __pyx_L1_error) + __pyx_type_6PyCafe_monitorpolicy.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_monitorpolicy.tp_dictoffset && __pyx_type_6PyCafe_monitorpolicy.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_monitorpolicy.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_monitorpolicy, (PyObject *)&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 908, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_monitorpolicy) < 0) __PYX_ERR(2, 908, __pyx_L1_error) + __pyx_ptype_6PyCafe_monitorpolicy = &__pyx_type_6PyCafe_monitorpolicy; + __pyx_vtabptr_6PyCafe_pvdata = &__pyx_vtable_6PyCafe_pvdata; + __pyx_vtable_6PyCafe_pvdata.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvdata *, PyObject *))__pyx_f_6PyCafe_6pvdata_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 955, __pyx_L1_error) + __pyx_type_6PyCafe_pvdata.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvdata.tp_dictoffset && __pyx_type_6PyCafe_pvdata.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvdata.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvdata.tp_dict, __pyx_vtabptr_6PyCafe_pvdata) < 0) __PYX_ERR(2, 955, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvdata, (PyObject *)&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 955, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvdata) < 0) __PYX_ERR(2, 955, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvdata = &__pyx_type_6PyCafe_pvdata; + __pyx_vtabptr_6PyCafe_pvgroup = &__pyx_vtable_6PyCafe_pvgroup; + __pyx_vtable_6PyCafe_pvgroup.showPrint = (PyObject *(*)(struct __pyx_obj_6PyCafe_pvgroup *, PyObject *, PyObject *))__pyx_f_6PyCafe_7pvgroup_showPrint; + if (PyType_Ready(&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1044, __pyx_L1_error) + __pyx_type_6PyCafe_pvgroup.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_pvgroup.tp_dictoffset && __pyx_type_6PyCafe_pvgroup.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_pvgroup.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvgroup.tp_dict, __pyx_vtabptr_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1044, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pvgroup, (PyObject *)&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1044, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_pvgroup) < 0) __PYX_ERR(2, 1044, __pyx_L1_error) + __pyx_ptype_6PyCafe_pvgroup = &__pyx_type_6PyCafe_pvgroup; + __pyx_vtabptr_6PyCafe_CyCafe = &__pyx_vtable_6PyCafe_CyCafe; + __pyx_vtable_6PyCafe_CyCafe.prepareCafeException = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *, int, PyObject *, struct __pyx_opt_args_6PyCafe_6CyCafe_prepareCafeException *__pyx_optional_args))__pyx_f_6PyCafe_6CyCafe_prepareCafeException; + __pyx_vtable_6PyCafe_CyCafe.getMonitorWhenToFlushSendBuffer = (PyObject *(*)(struct __pyx_obj_6PyCafe_CyCafe *))__pyx_f_6PyCafe_6CyCafe_getMonitorWhenToFlushSendBuffer; + if (PyType_Ready(&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_type_6PyCafe_CyCafe.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe_CyCafe.tp_dictoffset && __pyx_type_6PyCafe_CyCafe.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe_CyCafe.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type_6PyCafe_CyCafe.tp_dict, __pyx_vtabptr_6PyCafe_CyCafe) < 0) __PYX_ERR(0, 173, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyCafe, (PyObject *)&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(0, 173, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6PyCafe_CyCafe) < 0) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_ptype_6PyCafe_CyCafe = &__pyx_type_6PyCafe_CyCafe; + if (PyType_Ready(&__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv) < 0) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_dictoffset && __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_6PyCafe___pyx_scope_struct__verify_handlepv = &__pyx_type_6PyCafe___pyx_scope_struct__verify_handlepv; + __pyx_vtabptr_array = &__pyx_vtable_array; + __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview; + if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + __pyx_type___pyx_array.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error) + __pyx_array_type = &__pyx_type___pyx_array; + if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error) + __pyx_type___pyx_MemviewEnum.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error) + __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum; + __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview; + __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer; + __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice; + __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment; + __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar; + __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed; + __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object; + __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object; + if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + __pyx_type___pyx_memoryview.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error) + __pyx_memoryview_type = &__pyx_type___pyx_memoryview; + __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice; + __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview; + __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object; + __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object; + __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type; + if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + __pyx_type___pyx_memoryviewslice.tp_print = 0; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error) + __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(6, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(7, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(8, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(4, 206, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(4, 229, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(4, 233, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(4, 242, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(4, 918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_5array_array = __Pyx_ImportType(__pyx_t_1, "array", "array", sizeof(arrayobject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(5, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION < 3 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initPyCafe(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initPyCafe(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyCafe(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + static PyThread_type_lock __pyx_t_6[8]; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'PyCafe' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyCafe(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("PyCafe", __pyx_methods, __pyx_k_Cython_interface_to_the_C_CAFE_l, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + #if CYTHON_COMPILING_IN_PYPY + Py_INCREF(__pyx_b); + #endif + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_PyCafe) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_3, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "PyCafe")) { + if (unlikely(PyDict_SetItemString(modules, "PyCafe", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "PyCafe.pyx":14 + * """ + * + * import array # <<<<<<<<<<<<<< + * import ctypes + * import cython + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":15 + * + * import array + * import ctypes # <<<<<<<<<<<<<< + * import cython + * import inspect + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":17 + * import ctypes + * import cython + * import inspect # <<<<<<<<<<<<<< + * import numbers + * import numpy as np + */ + __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":18 + * import cython + * import inspect + * import numbers # <<<<<<<<<<<<<< + * import numpy as np + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":19 + * import inspect + * import numbers + * import numpy as np # <<<<<<<<<<<<<< + * + * import os + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":21 + * import numpy as np + * + * import os # <<<<<<<<<<<<<< + * import sys + * import time + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":22 + * + * import os + * import sys # <<<<<<<<<<<<<< + * import time + * import timeit + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":23 + * import os + * import sys + * import time # <<<<<<<<<<<<<< + * import timeit + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":24 + * import sys + * import time + * import timeit # <<<<<<<<<<<<<< + * + * import Cython.Compiler.Options + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_timeit, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_timeit, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":26 + * import timeit + * + * import Cython.Compiler.Options # <<<<<<<<<<<<<< + * + * from collections import OrderedDict + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_Cython_Compiler_Options, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cython, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":28 + * import Cython.Compiler.Options + * + * from collections import OrderedDict # <<<<<<<<<<<<<< + * + * from copy import deepcopy + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_OrderedDict); + __Pyx_GIVEREF(__pyx_n_s_OrderedDict); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":30 + * from collections import OrderedDict + * + * from copy import deepcopy # <<<<<<<<<<<<<< + * from cython cimport view + * from cython.operator cimport dereference as deref + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_deepcopy); + __Pyx_GIVEREF(__pyx_n_s_deepcopy); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_deepcopy); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_deepcopy, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":47 + * #Cython.Compiler.Options.annotate = True + * + * _pymodule = "PyCafe.pyx" # <<<<<<<<<<<<<< + * _pymodule_parts = _pymodule.split(".") + * _appname = _pymodule_parts[0] + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pymodule, __pyx_kp_u_PyCafe_pyx) < 0) __PYX_ERR(0, 47, __pyx_L1_error) + + /* "PyCafe.pyx":48 + * + * _pymodule = "PyCafe.pyx" + * _pymodule_parts = _pymodule.split(".") # <<<<<<<<<<<<<< + * _appname = _pymodule_parts[0] + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pymodule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pymodule_parts, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":49 + * _pymodule = "PyCafe.pyx" + * _pymodule_parts = _pymodule.split(".") + * _appname = _pymodule_parts[0] # <<<<<<<<<<<<<< + * + * _python_version = sys.version_info #[0:4] + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pymodule_parts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_appname, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":51 + * _appname = _pymodule_parts[0] + * + * _python_version = sys.version_info #[0:4] # <<<<<<<<<<<<<< + * + * cdef dict hmd = {} + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_python_version, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":53 + * _python_version = sys.version_info #[0:4] + * + * cdef dict hmd = {} # <<<<<<<<<<<<<< + * + * #needed to initialize PyArray_API in order to be able to use it + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_v_6PyCafe_hmd); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_hmd, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":56 + * + * #needed to initialize PyArray_API in order to be able to use it + * cnp.import_array() # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 56, __pyx_L1_error) + + /* "PyCafeDefs.pxi":3 + * + * # define threshold + * cdef int PYCAFE_PRINT_HIGH = 9 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH = 9; + + /* "PyCafeDefs.pxi":4 + * # define threshold + * cdef int PYCAFE_PRINT_HIGH = 9 + * cdef int PYCAFE_PRINT_MED = 5 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_LOW = 1 + * cdef int PYCAFE_PRINT_NONE = 0 + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_MED = 5; + + /* "PyCafeDefs.pxi":5 + * cdef int PYCAFE_PRINT_HIGH = 9 + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 # <<<<<<<<<<<<<< + * cdef int PYCAFE_PRINT_NONE = 0 + * + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LOW = 1; + + /* "PyCafeDefs.pxi":6 + * cdef int PYCAFE_PRINT_MED = 5 + * cdef int PYCAFE_PRINT_LOW = 1 + * cdef int PYCAFE_PRINT_NONE = 0 # <<<<<<<<<<<<<< + * + * cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_NONE = 0; + + /* "PyCafeDefs.pxi":8 + * cdef int PYCAFE_PRINT_NONE = 0 + * + * cdef int PYCAFE_PRINT_LEVEL = PYCAFE_PRINT_NONE # <<<<<<<<<<<<<< + * + * #ctypedef shared_ptr[vector[double]] vdouble_ptr + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL = __pyx_v_6PyCafe_PYCAFE_PRINT_NONE; + + /* "PyCafeDefs_pub.pxi":2 + * + * cdef object py_cb_handle = None # <<<<<<<<<<<<<< + * cdef object py_cb_handle_open = None + * + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafeDefs_pub.pxi":3 + * + * cdef object py_cb_handle = None + * cdef object py_cb_handle_open = None # <<<<<<<<<<<<<< + * + * cdef object cbobjt = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_handle_open); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_handle_open, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafeDefs_pub.pxi":5 + * cdef object py_cb_handle_open = None + * + * cdef object cbobjt = None # <<<<<<<<<<<<<< + * + * # ***********public or api*************** + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_cbobjt); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_cbobjt, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafe.pyx":88 + * include "PyCafeDefs.pxi" + * + * def verify_handlepv(func): # <<<<<<<<<<<<<< + * """Decorator to validate handle/PV input argument. + * + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6PyCafe_1verify_handlepv, NULL, __pyx_n_s_PyCafe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_verify_handlepv, __pyx_t_1) < 0) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":259 + * ########################################################################### + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def get_wf_express(self, handlePV, nelem): + * print("get_wf_express") + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":260 + * + * @verify_handlepv + * def get_wf_express(self, handlePV, nelem): # <<<<<<<<<<<<<< + * print("get_wf_express") + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_get_wf_express); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_get_wf_express, __pyx_t_1) < 0) __PYX_ERR(0, 260, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":286 + * return EPICS_VERSION + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): + * if cb is None: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":287 + * + * @verify_handlepv + * def setPyConnectCallbackFn(self, handlePV, cb: object = None): # <<<<<<<<<<<<<< + * if cb is None: + * return + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setPyConnectCallbackFn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setPyConnectCallbackFn, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1419 + * ############################################################################ + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def isConnected(self, handlePV): + * cdef str _METHOD = "isConnected" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1420 + * + * @verify_handlepv + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "isConnected" + * return self._c_cafe.isChannelConnected(handlePV) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_isConnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_isConnected, __pyx_t_1) < 0) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1443 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def supplementHandle(self, handlePV): + * #decorator casts handlePV to int + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1444 + * ############################################################################ + * @verify_handlepv + * def supplementHandle(self, handlePV): # <<<<<<<<<<<<<< + * #decorator casts handlePV to int + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_supplementHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_supplementHandle, __pyx_t_1) < 0) __PYX_ERR(0, 1444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1486 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def printHandle(self, handlePV): + * self._c_cafe.printHandle(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1487 + * ############################################################################ + * @verify_handlepv + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * self._c_cafe.printHandle(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_printHandle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_printHandle, __pyx_t_1) < 0) __PYX_ERR(0, 1487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1562 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getStatus(self, handlePV): + * return self.hh.getStatus(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1563 + * ############################################################################ + * @verify_handlepv + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getStatus(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getStatus); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getStatus, __pyx_t_1) < 0) __PYX_ERR(0, 1563, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1616 + * ############################################################################ + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def getDescription(self, handlePV): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1617 + * + * @verify_handlepv + * def getDescription(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * if not self.hh.hasDescription(handle): + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getDescription); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getDescription, __pyx_t_1) < 0) __PYX_ERR(0, 1617, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1627 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def hasDescription(self, handlePV): + * return self.hh.hasDescription(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1628 + * ############################################################################ + * @verify_handlepv + * def hasDescription(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasDescription(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_hasDescription); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_hasDescription, __pyx_t_1) < 0) __PYX_ERR(0, 1628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1632 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getUnits(self, handlePV): + * cdef string valString + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1633 + * ############################################################################ + * @verify_handlepv + * def getUnits(self, handlePV): # <<<<<<<<<<<<<< + * cdef string valString + * self.hh.getUnits(handlePV, valString) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getUnits); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getUnits, __pyx_t_1) < 0) __PYX_ERR(0, 1633, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1642 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getPrecision(self, handlePV): + * cdef short precision = 0 + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1643 + * ############################################################################ + * @verify_handlepv + * def getPrecision(self, handlePV): # <<<<<<<<<<<<<< + * cdef short precision = 0 + * self.hh.getPrecision(handlePV, precision) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getPrecision); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getPrecision, __pyx_t_1) < 0) __PYX_ERR(0, 1643, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1649 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def hasAlarmStatusSeverity(self, handlePV): + * return self.hh.hasAlarmStatusSeverity(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1650 + * ############################################################################ + * @verify_handlepv + * def hasAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.hasAlarmStatusSeverity(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_hasAlarmStatusSeverity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_hasAlarmStatusSeverity, __pyx_t_1) < 0) __PYX_ERR(0, 1650, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1654 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getAlarmStatusSeverity(self, handlePV): + * cdef short aStatSev[2] + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1655 + * ############################################################################ + * @verify_handlepv + * def getAlarmStatusSeverity(self, handlePV): # <<<<<<<<<<<<<< + * cdef short aStatSev[2] + * self.hh.getAlarmStatusSeverity(handlePV, aStatSev) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getAlarmStatusSeverity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getAlarmStatusSeverity, __pyx_t_1) < 0) __PYX_ERR(0, 1655, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1661 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getTimeStamp(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1662 + * ############################################################################ + * @verify_handlepv + * def getTimeStamp(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getTimeStamp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getTimeStamp, __pyx_t_1) < 0) __PYX_ERR(0, 1662, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1674 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getTimeStampAsDate(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1675 + * ############################################################################ + * @verify_handlepv + * def getTimeStampAsDate(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef HandleHelper hh + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getTimeStampAsDate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getTimeStampAsDate, __pyx_t_1) < 0) __PYX_ERR(0, 1675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1835 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getChannelInfo(self, handlePV): + * cdef str _METHOD = "getChannelInfo(handlePV)" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1836 + * ############################################################################ + * @verify_handlepv + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getChannelInfo(handlePV)" + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getChannelInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getChannelInfo, __pyx_t_1) < 0) __PYX_ERR(0, 1836, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1859 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def getWFAsString(self, handlePV, cache: bool = False): + * cdef str _METHOD = "getWFAsString" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1860 + * ################################################################################## + * @verify_handlepv + * def getWFAsString(self, handlePV, cache: bool = False): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getWFAsString" + * cdef string strWF + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getWFAsString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getWFAsString, __pyx_t_1) < 0) __PYX_ERR(0, 1860, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1920 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def isEnum(self, handlePV): + * return self._c_cafe.isEnum(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1921 + * ############################################################################ + * @verify_handlepv + * def isEnum(self, handlePV): # <<<<<<<<<<<<<< + * return self._c_cafe.isEnum(handlePV) + * ############################################################################ + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_isEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_isEnum, __pyx_t_1) < 0) __PYX_ERR(0, 1921, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1926 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getEnumStrings(self, handlePV): + * return self.hh.getEnumStrings(handlePV) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1927 + * ############################################################################ + * @verify_handlepv + * def getEnumStrings(self, handlePV): # <<<<<<<<<<<<<< + * return self.hh.getEnumStrings(handlePV) + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getEnumStrings); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getEnumStrings, __pyx_t_1) < 0) __PYX_ERR(0, 1927, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1931 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD = "getEnumFromString" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1932 + * ############################################################################ + * @verify_handlepv + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getEnumFromString" + * cdef short enumValue + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getEnumFromString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getEnumFromString, __pyx_t_1) < 0) __PYX_ERR(0, 1932, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1945 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): + * cdef str _METHOD = "getStringFromEnum" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1946 + * ############################################################################ + * @verify_handlepv + * def getStringFromEnum(self, handlePV, unsigned short enumValue = 0): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getStringFromEnum" + * cdef string enumString = self.hh.getStringFromEnum(handlePV, enumValue) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getStringFromEnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getStringFromEnum, __pyx_t_1) < 0) __PYX_ERR(0, 1946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1968 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1969 + * ############################################################################ + * @verify_handlepv + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * + * # Print Warning Message + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setDbrBase); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setDbrBase, __pyx_t_1) < 0) __PYX_ERR(0, 1969, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1983 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getDbrBase(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1984 + * ############################################################################ + * @verify_handlepv + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef DBR_TYPE _cafeDbrType = DBR_PLAIN + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getDbrBase); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getDbrBase, __pyx_t_1) < 0) __PYX_ERR(0, 1984, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":1994 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setGetCacheWaitPolicy( + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":1995 + * ############################################################################ + * @verify_handlepv + * def setGetCacheWaitPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setGetCacheWaitPolicy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setGetCacheWaitPolicy, __pyx_t_1) < 0) __PYX_ERR(0, 1995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2045 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def setGetActionWhenMonitorPolicy( + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2046 + * ############################################################################ + * @verify_handlepv + * def setGetActionWhenMonitorPolicy( # <<<<<<<<<<<<<< + * self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_setGetActionWhenMonitorPolicy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2046, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2045, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_setGetActionWhenMonitorPolicy, __pyx_t_1) < 0) __PYX_ERR(0, 2046, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2087 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getNonBlocking(self, handlePV): + * '''Requires cafe.ca_flush_io by user. + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2088 + * ############################################################################ + * @verify_handlepv + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * '''Requires cafe.ca_flush_io by user. + * In this resepct, it differs from cafe.getAsync + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getNonBlocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getNonBlocking, __pyx_t_1) < 0) __PYX_ERR(0, 2088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2136 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def get(self, handlePV = 0, str dt='native'): + * cdef str _METHOD = "get(handlePV, dt)" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2137 + * ############################################################################ + * @verify_handlepv + * def get(self, handlePV = 0, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "get(handlePV, dt)" + * + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(0, 2137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2297 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD = "getList" + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2298 + * ############################################################################ + * @verify_handlepv + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD = "getList" + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getList); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getList, __pyx_t_1) < 0) __PYX_ERR(0, 2298, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":2577 + * + * ############################################################################ + * @verify_handlepv # <<<<<<<<<<<<<< + * def getArray(self, handlePV, str dt='native', str art='numpy'): + * ############################################################################ + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":2578 + * ############################################################################ + * @verify_handlepv + * def getArray(self, handlePV, str dt='native', str art='numpy'): # <<<<<<<<<<<<<< + * ############################################################################ + * # Typed Memoryviews from K.W. Smith + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getArray, __pyx_t_1) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":3673 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def waitForGetEvent(self, handlePV): + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":3674 + * ################################################################################## + * @verify_handlepv + * def waitForGetEvent(self, handlePV): # <<<<<<<<<<<<<< + * + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_waitForGetEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_waitForGetEvent, __pyx_t_1) < 0) __PYX_ERR(0, 3674, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":5773 + * return mp + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__94 = DBR_TIME; + + /* "PyCafe.pyx":5774 + * + * def groupMonitor(self, ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * return self.groupMonitorStart(ghandleName, cb, dbr, mask, notify_milliseconds) + */ + __pyx_k__95 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":5780 + * ################################################################################## + * def groupMonitorStart(self, ghandleName, object cb=None, + * DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__96 = DBR_TIME; + + /* "PyCafe.pyx":5781 + * def groupMonitorStart(self, ghandleName, object cb=None, + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * ################################################################################## + */ + __pyx_k__97 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":5865 + * def groupMonitorStartWithCBList(self, + * ghandleName, list cb=None, + * DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=\ + * DBE_VALUE | DBE_LOG | DBE_ALARM, + */ + __pyx_k__100 = DBR_TIME; + + /* "PyCafe.pyx":5867 + * DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=\ + * DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * ############################################################################ + */ + __pyx_k__101 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":6684 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def getNoMonitors(self, handlePV): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":6685 + * ################################################################################## + * @verify_handlepv + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getNmonitor(handle) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getNoMonitors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getNoMonitors, __pyx_t_1) < 0) __PYX_ERR(0, 6685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":6692 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def getMonitorIDsInWaiting(self, handlePV): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":6693 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDsInWaiting(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDsInWaiting(handle) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getMonitorIDsInWaiting); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getMonitorIDsInWaiting, __pyx_t_1) < 0) __PYX_ERR(0, 6693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":6700 + * + * ################################################################################## + * @verify_handlepv # <<<<<<<<<<<<<< + * def getMonitorIDs(self, handlePV): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":6701 + * ################################################################################## + * @verify_handlepv + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef unsigned int handle = handlePV + * return self.hh.getMonitorIDs(handle) + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_getMonitorIDs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_getMonitorIDs, __pyx_t_1) < 0) __PYX_ERR(0, 6701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":6706 + * ############################################################################ + * + * @verify_handlepv # <<<<<<<<<<<<<< + * def updateMonitorPolicyDeltaMS( + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify_handlepv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafe.pyx":6707 + * + * @verify_handlepv + * def updateMonitorPolicyDeltaMS( # <<<<<<<<<<<<<< + * self, handlePV, unsigned int monid=0, unsigned int deltaMS=0): + * cdef unsigned int handle = handlePV + */ + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_6PyCafe_CyCafe, __pyx_n_s_updateMonitorPolicyDeltaMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_6PyCafe_CyCafe->tp_dict, __pyx_n_s_updateMonitorPolicyDeltaMS, __pyx_t_1) < 0) __PYX_ERR(0, 6707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_ptype_6PyCafe_CyCafe); + + /* "PyCafe.pyx":6716 + * ############################################################################ + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__113 = DBR_TIME; + + /* "PyCafe.pyx":6717 + * def monitor( + * self, handlePV, object cb=None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned short notify_milliseconds=0): + * + */ + __pyx_k__114 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":6724 + * ############################################################################ + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, # <<<<<<<<<<<<<< + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, + * unsigned int nelem=0, + */ + __pyx_k__115 = DBR_TIME; + + /* "PyCafe.pyx":6725 + * def monitorStart( + * self, handlePV, cb: object = None, DBR_TYPE dbr=DBR_TIME, + * unsigned int mask=DBE_VALUE | DBE_LOG | DBE_ALARM, # <<<<<<<<<<<<<< + * unsigned int nelem=0, + * unsigned short notify_milliseconds=0): + */ + __pyx_k__116 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "(tree fragment)":1 + * def __pyx_unpickle_CafeException(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6PyCafe_3__pyx_unpickle_CafeException, NULL, __pyx_n_s_PyCafe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CafeException, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":1 + * # dtutils: language = c++ # <<<<<<<<<<<<<< + * # file: PyCafe.pyx + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":209 + * info.obj = self + * + * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * def __dealloc__(array self): + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_array_type); + + /* "View.MemoryView":286 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(generic); + __Pyx_DECREF_SET(generic, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":287 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(strided); + __Pyx_DECREF_SET(strided, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":288 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(indirect); + __Pyx_DECREF_SET(indirect, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":291 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(contiguous); + __Pyx_DECREF_SET(contiguous, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":292 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_XGOTREF(indirect_contiguous); + __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":316 + * + * DEF THREAD_LOCKS_PREALLOCATED = 8 + * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<< + * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ + * PyThread_allocate_lock(), + */ + __pyx_memoryview_thread_locks_used = 0; + + /* "View.MemoryView":317 + * DEF THREAD_LOCKS_PREALLOCATED = 8 + * cdef int __pyx_memoryview_thread_locks_used = 0 + * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<< + * PyThread_allocate_lock(), + * PyThread_allocate_lock(), + */ + __pyx_t_6[0] = PyThread_allocate_lock(); + __pyx_t_6[1] = PyThread_allocate_lock(); + __pyx_t_6[2] = PyThread_allocate_lock(); + __pyx_t_6[3] = PyThread_allocate_lock(); + __pyx_t_6[4] = PyThread_allocate_lock(); + __pyx_t_6[5] = PyThread_allocate_lock(); + __pyx_t_6[6] = PyThread_allocate_lock(); + __pyx_t_6[7] = PyThread_allocate_lock(); + memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_6, sizeof(__pyx_memoryview_thread_locks[0]) * (8)); + + /* "View.MemoryView":545 + * info.obj = self + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 545, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryview_type); + + /* "View.MemoryView":991 + * return self.from_object + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 991, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryviewslice_type); + + /* "(tree fragment)":1 + * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_Enum__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.name = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init PyCafe", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init PyCafe"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* WriteUnraisableException */ +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(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; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +/* PyObjectFormatAndDecref */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(s))) { + PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); + Py_DECREF(s); + return result; + } + #endif + return __Pyx_PyObject_FormatAndDecref(s, f); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + +/* CIntToDigits */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; +#if CYTHON_PEP393_ENABLED + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); +#else + Py_UNICODE *udata; + uval = PyUnicode_FromUnicode(NULL, ulength); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_AS_UNICODE(uval); +#endif + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + uval = NULL; + PyObject *sign = NULL, *padding = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp; + PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign); + if (unlikely(!repeat)) goto done_or_error; + tmp = PyNumber_Multiply(padding, repeat); + Py_DECREF(repeat); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyNumber_Add(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyNumber_Add(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* CIntToPyUnicode */ +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned short uint16_t; + #else + typedef unsigned __int16 uint16_t; + #endif + #endif +#else + #include +#endif +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(int)*3+2]; + char *dpos, *end = digits + sizeof(int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + int remaining; + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (int) (remaining / (8*8)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_8)[digit_pos]; + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (int) (remaining / (10*10)); + dpos -= 2; + *(uint16_t*)dpos = ((uint16_t*)DIGIT_PAIRS_10)[digit_pos]; + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + if (last_one_off) { + assert(*dpos == '0'); + dpos++; + } + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + CYTHON_UNUSED Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind; + Py_ssize_t i, char_pos; + void *result_udata; +#if CYTHON_PEP393_ENABLED + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + result_udata = PyUnicode_DATA(result_uval); +#else + result_uval = PyUnicode_FromUnicode(NULL, result_ulength); + if (unlikely(!result_uval)) return NULL; + result_ukind = sizeof(Py_UNICODE); + result_udata = PyUnicode_AS_UNICODE(result_uval); +#endif + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); + if (unlikely(__Pyx_PyUnicode_READY(uval))) + goto bad; + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + if (unlikely(!ulength)) + continue; + if (unlikely(char_pos + ulength < 0)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { + memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); + } else { + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + result_ulength++; + value_count++; + return PyUnicode_Join(__pyx_empty_unicode, value_tuple); +#endif +} + +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetAttr */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/* GetAttr3 */ +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r = __Pyx_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* PyObjectFormat */ +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { + int ret; + _PyUnicodeWriter writer; + if (likely(PyFloat_CheckExact(obj))) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyFloat_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else if (likely(PyLong_CheckExact(obj))) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyLong_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else { + return PyObject_Format(obj, format_spec); + } + if (unlikely(ret == -1)) { + _PyUnicodeWriter_Dealloc(&writer); + return NULL; + } + return _PyUnicodeWriter_Finish(&writer); +} +#endif + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* decode_c_bytes */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +} + +/* append */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* SliceTupleAndList */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + *_length = stop - start; + *_start = start; + *_stop = stop; +} +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyList_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyList_New(0); + dest = PyList_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyListObject*)src)->ob_item + start, + ((PyListObject*)dest)->ob_item, + length); + return dest; +} +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyTuple_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyTuple_New(0); + dest = PyTuple_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyTupleObject*)src)->ob_item + start, + ((PyTupleObject*)dest)->ob_item, + length); + return dest; +} +#endif + +/* FetchCommonType */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CythonFunction */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromString(m->func.m_ml->ml_name); +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); + if (op == NULL) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + PyObject_GC_Track(op); + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a + b); + if (likely((x^a) >= 0 || (x^b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("add", return NULL) + result = ((double)a) + (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#endif + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* SetItemInt */ +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (!j) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old = PyList_GET_ITEM(o, n); + Py_INCREF(v); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 1; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return m->sq_ass_item(o, i, v); + } + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) +#else + if (is_list || PySequence_Check(o)) +#endif + { + return PySequence_SetItem(o, i, v); + } +#endif + return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); +} + +/* BufferIndexError */ +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* MemviewSliceInit */ +static int +__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference) +{ + __Pyx_RefNannyDeclarations + int i, retval=-1; + Py_buffer *buf = &memview->view; + __Pyx_RefNannySetupContext("init_memviewslice", 0); + if (!buf) { + PyErr_SetString(PyExc_ValueError, + "buf is NULL."); + goto fail; + } else if (memviewslice->memview || memviewslice->data) { + PyErr_SetString(PyExc_ValueError, + "memviewslice is already initialized!"); + goto fail; + } + if (buf->strides) { + for (i = 0; i < ndim; i++) { + memviewslice->strides[i] = buf->strides[i]; + } + } else { + Py_ssize_t stride = buf->itemsize; + for (i = ndim - 1; i >= 0; i--) { + memviewslice->strides[i] = stride; + stride *= buf->shape[i]; + } + } + for (i = 0; i < ndim; i++) { + memviewslice->shape[i] = buf->shape[i]; + if (buf->suboffsets) { + memviewslice->suboffsets[i] = buf->suboffsets[i]; + } else { + memviewslice->suboffsets[i] = -1; + } + } + memviewslice->memview = memview; + memviewslice->data = (char *)buf->buf; + if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { + Py_INCREF(memview); + } + retval = 0; + goto no_fail; +fail: + memviewslice->memview = 0; + memviewslice->data = 0; + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} +#ifndef Py_NO_RETURN +#define Py_NO_RETURN +#endif +static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { + va_list vargs; + char msg[200]; +#ifdef HAVE_STDARG_PROTOTYPES + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + va_end(vargs); + Py_FatalError(msg); +} +static CYTHON_INLINE int +__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)++; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE int +__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)--; + PyThread_release_lock(lock); + return result; +} +static CYTHON_INLINE void +__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) +{ + int first_time; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (!memview || (PyObject *) memview == Py_None) + return; + if (__pyx_get_slice_count(memview) < 0) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + first_time = __pyx_add_acquisition_count(memview) == 0; + if (first_time) { + if (have_gil) { + Py_INCREF((PyObject *) memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_INCREF((PyObject *) memview); + PyGILState_Release(_gilstate); + } + } +} +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice, + int have_gil, int lineno) { + int last_time; + struct __pyx_memoryview_obj *memview = memslice->memview; + if (!memview ) { + return; + } else if ((PyObject *) memview == Py_None) { + memslice->memview = NULL; + return; + } + if (__pyx_get_slice_count(memview) <= 0) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + last_time = __pyx_sub_acquisition_count(memview) == 1; + memslice->data = NULL; + if (last_time) { + if (have_gil) { + Py_CLEAR(memslice->memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_CLEAR(memslice->memview); + PyGILState_Release(_gilstate); + } + } else { + memslice->memview = NULL; + } +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long x; + long a = PyInt_AS_LONG(op1); + x = (long)((unsigned long)a - b); + if (likely((x^a) >= 0 || (x^~b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + if (likely(__Pyx_sst_abs(size) <= 1)) { + a = likely(size) ? digits[0] : 0; + if (size == -1) a = -a; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + } + x = a - b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla - llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + double result; + PyFPE_START_PROTECT("subtract", return NULL) + result = ((double)a) - (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#endif + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/* UnpackUnboundCMethod */ +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + +/* CallUnboundCMethod0 */ +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *args, *result = NULL; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_ASSUME_SAFE_MACROS + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); +#else + args = PyTuple_Pack(1, self); + if (unlikely(!args)) goto bad; +#endif + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + Py_DECREF(args); +bad: + return result; +} + +/* py_dict_values */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d); + else + return PyDict_Values(d); +} + +/* py_dict_keys */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d); + else + return PyDict_Keys(d); +} + +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_FALSE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_TRUE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_TRUE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_NE)); +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* HasAttr */ +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +/* DictGetItem */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* None */ +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + Py_ssize_t q = a / b; + Py_ssize_t r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return q; +} + +/* decode_c_string */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; i= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetVTable */ +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) + goto bad; + if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_3); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; +#else + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; +#endif +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto GOOD; +BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PatchModuleWithCoroutine */ +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { +#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + int result; + PyObject *globals, *result_obj; + globals = PyDict_New(); if (unlikely(!globals)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_coroutine_type", + #ifdef __Pyx_Coroutine_USED + (PyObject*)__pyx_CoroutineType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_generator_type", + #ifdef __Pyx_Generator_USED + (PyObject*)__pyx_GeneratorType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; + result_obj = PyRun_String(py_code, Py_file_input, globals, globals); + if (unlikely(!result_obj)) goto ignore; + Py_DECREF(result_obj); + Py_DECREF(globals); + return module; +ignore: + Py_XDECREF(globals); + PyErr_WriteUnraisable(module); + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { + Py_DECREF(module); + module = NULL; + } +#else + py_code++; +#endif + return module; +} + +/* PatchInspect */ +static PyObject* __Pyx_patch_inspect(PyObject* module) { +#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) + static int inspect_patched = 0; + if (unlikely((!inspect_patched) && module)) { + module = __Pyx_Coroutine_patch_module( + module, "" +"old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n" +"if old_types is None or not isinstance(old_types, set):\n" +" old_types = set()\n" +" def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n" +" def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n" +" cy_isgenerator._cython_generator_types = cython_generator_types\n" +" return cy_isgenerator\n" +" _module.isgenerator = cy_wrap(_module.isgenerator)\n" +"old_types.add(_cython_generator_type)\n" + ); + inspect_patched = 1; + } +#else + if ((0)) return __Pyx_Coroutine_patch_module(module, NULL); +#endif + return module; +} + +/* GetNameInClass */ +static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + result = __Pyx_PyObject_GetAttrStr(nmspace, name); + if (!result) { + result = __Pyx_GetGlobalNameAfterAttributeLookup(name); + } + return result; +} + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)) return __pyx_pw_7cpython_5array_5array_1__getbuffer__(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags); + if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); + else if (__Pyx_TypeCheck(obj, __pyx_ptype_7cpython_5array_array)) __pyx_pw_7cpython_5array_5array_3__releasebuffer__(obj, view); + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + +/* MemviewSliceIsContig */ +static int +__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim) +{ + int i, index, step, start; + Py_ssize_t itemsize = mvs.memview->view.itemsize; + if (order == 'F') { + step = 1; + start = 0; + } else { + step = -1; + start = ndim - 1; + } + for (i = 0; i < ndim; i++) { + index = start + step * i; + if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) + return 0; + itemsize *= mvs.shape[index]; + } + return 1; +} + +/* OverlappingSlices */ +static void +__pyx_get_array_memory_extents(__Pyx_memviewslice *slice, + void **out_start, void **out_end, + int ndim, size_t itemsize) +{ + char *start, *end; + int i; + start = end = slice->data; + for (i = 0; i < ndim; i++) { + Py_ssize_t stride = slice->strides[i]; + Py_ssize_t extent = slice->shape[i]; + if (extent == 0) { + *out_start = *out_end = start; + return; + } else { + if (stride > 0) + end += stride * (extent - 1); + else + start += stride * (extent - 1); + } + } + *out_start = start; + *out_end = end + itemsize; +} +static int +__pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize) +{ + void *start1, *end1, *start2, *end2; + __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); + __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); + return (start1 < end2) && (start2 < end1); +} + +/* Capsule */ +static CYTHON_INLINE PyObject * +__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig) +{ + PyObject *cobj; +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(p, sig, NULL); +#else + cobj = PyCObject_FromVoidPtr(p, NULL); +#endif + return cobj; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) ((unsigned PY_LONG_LONG) 0 - (unsigned PY_LONG_LONG) 1), const_zero = (unsigned PY_LONG_LONG) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned PY_LONG_LONG), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { + const short neg_one = (short) ((short) 0 - (short) 1), const_zero = (short) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(short) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(short) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(short) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(short), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) { + const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned short) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned short) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned short) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned short), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value) { + const chtype neg_one = (chtype) ((chtype) 0 - (chtype) 1), const_zero = (chtype) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(chtype) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(chtype) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(chtype) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(chtype) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(chtype) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(chtype), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value) { + const DBR_TYPE neg_one = (DBR_TYPE) ((DBR_TYPE) 0 - (DBR_TYPE) 1), const_zero = (DBR_TYPE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(DBR_TYPE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(DBR_TYPE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(DBR_TYPE), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { + const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value) { + const npy_uint8 neg_one = (npy_uint8) ((npy_uint8) 0 - (npy_uint8) 1), const_zero = (npy_uint8) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_uint8) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_uint8) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_uint8) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_uint8), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelWhenToFlushSendBufferPolicyKind(ChannelWhenToFlushSendBufferPolicyKind value) { + const ChannelWhenToFlushSendBufferPolicyKind neg_one = (ChannelWhenToFlushSendBufferPolicyKind) ((ChannelWhenToFlushSendBufferPolicyKind) 0 - (ChannelWhenToFlushSendBufferPolicyKind) 1), const_zero = (ChannelWhenToFlushSendBufferPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelWhenToFlushSendBufferPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value) { + const ChannelGetCacheWaitPolicyKind neg_one = (ChannelGetCacheWaitPolicyKind) ((ChannelGetCacheWaitPolicyKind) 0 - (ChannelGetCacheWaitPolicyKind) 1), const_zero = (ChannelGetCacheWaitPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelGetCacheWaitPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetCacheWaitPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (ChannelGetActionWhenMonitorPolicyKind) ((ChannelGetActionWhenMonitorPolicyKind) 0 - (ChannelGetActionWhenMonitorPolicyKind) 1), const_zero = (ChannelGetActionWhenMonitorPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetActionWhenMonitorPolicyKind), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value) { + const CAFE_CFT_STATE neg_one = (CAFE_CFT_STATE) ((CAFE_CFT_STATE) 0 - (CAFE_CFT_STATE) 1), const_zero = (CAFE_CFT_STATE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CAFE_CFT_STATE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CAFE_CFT_STATE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(CAFE_CFT_STATE), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value) { + const dbr_long_t neg_one = (dbr_long_t) ((dbr_long_t) 0 - (dbr_long_t) 1), const_zero = (dbr_long_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_long_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_long_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_long_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_long_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_char_t(dbr_char_t value) { + const dbr_char_t neg_one = (dbr_char_t) ((dbr_char_t) 0 - (dbr_char_t) 1), const_zero = (dbr_char_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_char_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_char_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_char_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_char_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_enum_t(dbr_enum_t value) { + const dbr_enum_t neg_one = (dbr_enum_t) ((dbr_enum_t) 0 - (dbr_enum_t) 1), const_zero = (dbr_enum_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(dbr_enum_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_enum_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_enum_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(dbr_enum_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_enum_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(dbr_enum_t), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value) { + const npy_int16 neg_one = (npy_int16) ((npy_int16) 0 - (npy_int16) 1), const_zero = (npy_int16) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int16) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int16) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int16) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int16), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int16_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int16(*(__pyx_t_5numpy_int16_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int16_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int16_t value = __Pyx_PyInt_As_npy_int16(obj); + if ((value == ((npy_int16)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int16_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int8(npy_int8 value) { + const npy_int8 neg_one = (npy_int8) ((npy_int8) 0 - (npy_int8) 1), const_zero = (npy_int8) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int8) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int8) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int8) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int8), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int8_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int8(*(__pyx_t_5numpy_int8_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int8_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int8_t value = __Pyx_PyInt_As_npy_int8(obj); + if ((value == ((npy_int8)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int8_t *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint8_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_uint8(*(__pyx_t_5numpy_uint8_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint8_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_uint8_t value = __Pyx_PyInt_As_npy_uint8(obj); + if ((value == ((npy_uint8)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_uint8_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { + const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_int32) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int32) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_int32) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_int32), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int32_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_int32(*(__pyx_t_5numpy_int32_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_int32_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_int32_t value = __Pyx_PyInt_As_npy_int32(obj); + if ((value == ((npy_int32)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_int32_t *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value) { + const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(npy_uint32) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_uint32) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(npy_uint32) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(npy_uint32), + little, !is_unsigned); + } +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint32_t(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_npy_uint32(*(__pyx_t_5numpy_uint32_t *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint32_t(const char *itemp, PyObject *obj) { + __pyx_t_5numpy_uint32_t value = __Pyx_PyInt_As_npy_uint32(obj); + if ((value == ((npy_uint32)-1)) && PyErr_Occurred()) + return 0; + *(__pyx_t_5numpy_uint32_t *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) { + int value = __Pyx_PyInt_As_int(obj); + if ((value == (int)-1) && PyErr_Occurred()) + return 0; + *(int *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(float *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj) { + float value = __pyx_PyFloat_AsFloat(obj); + if ((value == (float)-1) && PyErr_Occurred()) + return 0; + *(float *) itemp = value; + return 1; +} + +/* MemviewDtypeToObject */ +static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(double *) itemp); +} +static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) { + double value = __pyx_PyFloat_AsDouble(obj); + if ((value == (double)-1) && PyErr_Occurred()) + return 0; + *(double *) itemp = value; + return 1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) { + const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned char) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned char) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned char), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_ERROR_STATE(CAFE_ERROR_STATE value) { + const CAFE_ERROR_STATE neg_one = (CAFE_ERROR_STATE) ((CAFE_ERROR_STATE) 0 - (CAFE_ERROR_STATE) 1), const_zero = (CAFE_ERROR_STATE) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CAFE_ERROR_STATE) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CAFE_ERROR_STATE) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CAFE_ERROR_STATE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(CAFE_ERROR_STATE), + little, !is_unsigned); + } +} + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = 1.0 / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = 1.0 / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0, -1); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = 1.0 / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = 1.0 / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0, -1); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum NPY_TYPES) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum NPY_TYPES) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), + little, !is_unsigned); + } +} + +/* MemviewSliceCopyTemplate */ +static __Pyx_memviewslice +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object) +{ + __Pyx_RefNannyDeclarations + int i; + __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_memoryview_obj *from_memview = from_mvs->memview; + Py_buffer *buf = &from_memview->view; + PyObject *shape_tuple = NULL; + PyObject *temp_int = NULL; + struct __pyx_array_obj *array_obj = NULL; + struct __pyx_memoryview_obj *memview_obj = NULL; + __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); + for (i = 0; i < ndim; i++) { + if (from_mvs->suboffsets[i] >= 0) { + PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " + "indirect dimensions (axis %d)", i); + goto fail; + } + } + shape_tuple = PyTuple_New(ndim); + if (unlikely(!shape_tuple)) { + goto fail; + } + __Pyx_GOTREF(shape_tuple); + for(i = 0; i < ndim; i++) { + temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); + if(unlikely(!temp_int)) { + goto fail; + } else { + PyTuple_SET_ITEM(shape_tuple, i, temp_int); + temp_int = NULL; + } + } + array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); + if (unlikely(!array_obj)) { + goto fail; + } + __Pyx_GOTREF(array_obj); + memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + (PyObject *) array_obj, contig_flag, + dtype_is_object, + from_mvs->memview->typeinfo); + if (unlikely(!memview_obj)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) + goto fail; + if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, + dtype_is_object) < 0)) + goto fail; + goto no_fail; +fail: + __Pyx_XDECREF(new_mvs.memview); + new_mvs.memview = NULL; + new_mvs.data = NULL; +no_fail: + __Pyx_XDECREF(shape_tuple); + __Pyx_XDECREF(temp_int); + __Pyx_XDECREF(array_obj); + __Pyx_RefNannyFinishContext(); + return new_mvs; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned int) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned int) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned int) -1; + } + } else { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyInt_As_unsigned_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned int"); + return (unsigned int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *x) { + const ChannelWhenToFlushSendBufferPolicyKind neg_one = (ChannelWhenToFlushSendBufferPolicyKind) ((ChannelWhenToFlushSendBufferPolicyKind) 0 - (ChannelWhenToFlushSendBufferPolicyKind) 1), const_zero = (ChannelWhenToFlushSendBufferPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelWhenToFlushSendBufferPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWhenToFlushSendBufferPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelWhenToFlushSendBufferPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWhenToFlushSendBufferPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) (((ChannelWhenToFlushSendBufferPolicyKind)-1)*(((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWhenToFlushSendBufferPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWhenToFlushSendBufferPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWhenToFlushSendBufferPolicyKind) ((((((((((ChannelWhenToFlushSendBufferPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWhenToFlushSendBufferPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelWhenToFlushSendBufferPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelWhenToFlushSendBufferPolicyKind) -1; + } + } else { + ChannelWhenToFlushSendBufferPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelWhenToFlushSendBufferPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelWhenToFlushSendBufferPolicyKind"); + return (ChannelWhenToFlushSendBufferPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelWhenToFlushSendBufferPolicyKind"); + return (ChannelWhenToFlushSendBufferPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *x) { + const ChannelWaitForResponsePolicyKind neg_one = (ChannelWaitForResponsePolicyKind) ((ChannelWaitForResponsePolicyKind) 0 - (ChannelWaitForResponsePolicyKind) 1), const_zero = (ChannelWaitForResponsePolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelWaitForResponsePolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelWaitForResponsePolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWaitForResponsePolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelWaitForResponsePolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelWaitForResponsePolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((((ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) (((ChannelWaitForResponsePolicyKind)-1)*(((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelWaitForResponsePolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelWaitForResponsePolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelWaitForResponsePolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelWaitForResponsePolicyKind) ((((((((((ChannelWaitForResponsePolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelWaitForResponsePolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelWaitForResponsePolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelWaitForResponsePolicyKind) -1; + } + } else { + ChannelWaitForResponsePolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelWaitForResponsePolicyKind) -1; + val = __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelWaitForResponsePolicyKind"); + return (ChannelWaitForResponsePolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelWaitForResponsePolicyKind"); + return (ChannelWaitForResponsePolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *x) { + const ChannelRequestPolicyKind neg_one = (ChannelRequestPolicyKind) ((ChannelRequestPolicyKind) 0 - (ChannelRequestPolicyKind) 1), const_zero = (ChannelRequestPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelRequestPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelRequestPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelRequestPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelRequestPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelRequestPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelRequestPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelRequestPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelRequestPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelRequestPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelRequestPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelRequestPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((((ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) (((ChannelRequestPolicyKind)-1)*(((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelRequestPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelRequestPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelRequestPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelRequestPolicyKind) ((((((((((ChannelRequestPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelRequestPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelRequestPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelRequestPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelRequestPolicyKind) -1; + } + } else { + ChannelRequestPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelRequestPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelRequestPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelRequestPolicyKind"); + return (ChannelRequestPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelRequestPolicyKind"); + return (ChannelRequestPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) { + const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned short) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned short) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned short) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 2 * PyLong_SHIFT) { + return (unsigned short) (((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 3 * PyLong_SHIFT) { + return (unsigned short) (((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) >= 4 * PyLong_SHIFT) { + return (unsigned short) (((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned short) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned short) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned short) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned short, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned short) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + return (unsigned short) ((((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + return (unsigned short) ((((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) { + return (unsigned short) (((unsigned short)-1)*(((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned short) - 1 > 4 * PyLong_SHIFT) { + return (unsigned short) ((((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned short) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned short val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned short) -1; + } + } else { + unsigned short val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned short) -1; + val = __Pyx_PyInt_As_unsigned_short(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned short"); + return (unsigned short) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned short"); + return (unsigned short) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *x) { + const DBR_TYPE neg_one = (DBR_TYPE) ((DBR_TYPE) 0 - (DBR_TYPE) 1), const_zero = (DBR_TYPE) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(DBR_TYPE) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (DBR_TYPE) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (DBR_TYPE) 0; + case 1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, digit, digits[0]) + case 2: + if (8 * sizeof(DBR_TYPE) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 2 * PyLong_SHIFT) { + return (DBR_TYPE) (((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(DBR_TYPE) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 3 * PyLong_SHIFT) { + return (DBR_TYPE) (((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(DBR_TYPE) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) >= 4 * PyLong_SHIFT) { + return (DBR_TYPE) (((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (DBR_TYPE) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(DBR_TYPE) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (DBR_TYPE) 0; + case -1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(DBR_TYPE, digit, +digits[0]) + case -2: + if (8 * sizeof(DBR_TYPE) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(DBR_TYPE) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(DBR_TYPE) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(DBR_TYPE) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((((DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(DBR_TYPE) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 4 * PyLong_SHIFT) { + return (DBR_TYPE) (((DBR_TYPE)-1)*(((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(DBR_TYPE) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(DBR_TYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(DBR_TYPE) - 1 > 4 * PyLong_SHIFT) { + return (DBR_TYPE) ((((((((((DBR_TYPE)digits[3]) << PyLong_SHIFT) | (DBR_TYPE)digits[2]) << PyLong_SHIFT) | (DBR_TYPE)digits[1]) << PyLong_SHIFT) | (DBR_TYPE)digits[0]))); + } + } + break; + } +#endif + if (sizeof(DBR_TYPE) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + DBR_TYPE val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (DBR_TYPE) -1; + } + } else { + DBR_TYPE val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (DBR_TYPE) -1; + val = __Pyx_PyInt_As_DBR_TYPE(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to DBR_TYPE"); + return (DBR_TYPE) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to DBR_TYPE"); + return (DBR_TYPE) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *x) { + const ChannelGetCacheWaitPolicyKind neg_one = (ChannelGetCacheWaitPolicyKind) ((ChannelGetCacheWaitPolicyKind) 0 - (ChannelGetCacheWaitPolicyKind) 1), const_zero = (ChannelGetCacheWaitPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelGetCacheWaitPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelGetCacheWaitPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetCacheWaitPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelGetCacheWaitPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetCacheWaitPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((((ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) (((ChannelGetCacheWaitPolicyKind)-1)*(((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetCacheWaitPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetCacheWaitPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetCacheWaitPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetCacheWaitPolicyKind) ((((((((((ChannelGetCacheWaitPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetCacheWaitPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelGetCacheWaitPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelGetCacheWaitPolicyKind) -1; + } + } else { + ChannelGetCacheWaitPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelGetCacheWaitPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelGetCacheWaitPolicyKind"); + return (ChannelGetCacheWaitPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelGetCacheWaitPolicyKind"); + return (ChannelGetCacheWaitPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *x) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (ChannelGetActionWhenMonitorPolicyKind) ((ChannelGetActionWhenMonitorPolicyKind) 0 - (ChannelGetActionWhenMonitorPolicyKind) 1), const_zero = (ChannelGetActionWhenMonitorPolicyKind) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (ChannelGetActionWhenMonitorPolicyKind) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetActionWhenMonitorPolicyKind) 0; + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, digit, digits[0]) + case 2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) >= 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (ChannelGetActionWhenMonitorPolicyKind) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (ChannelGetActionWhenMonitorPolicyKind) 0; + case -1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, digit, +digits[0]) + case -2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((((ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) (((ChannelGetActionWhenMonitorPolicyKind)-1)*(((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(ChannelGetActionWhenMonitorPolicyKind, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(ChannelGetActionWhenMonitorPolicyKind) - 1 > 4 * PyLong_SHIFT) { + return (ChannelGetActionWhenMonitorPolicyKind) ((((((((((ChannelGetActionWhenMonitorPolicyKind)digits[3]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[2]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[1]) << PyLong_SHIFT) | (ChannelGetActionWhenMonitorPolicyKind)digits[0]))); + } + } + break; + } +#endif + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + ChannelGetActionWhenMonitorPolicyKind val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (ChannelGetActionWhenMonitorPolicyKind) -1; + } + } else { + ChannelGetActionWhenMonitorPolicyKind val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (ChannelGetActionWhenMonitorPolicyKind) -1; + val = __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to ChannelGetActionWhenMonitorPolicyKind"); + return (ChannelGetActionWhenMonitorPolicyKind) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to ChannelGetActionWhenMonitorPolicyKind"); + return (ChannelGetActionWhenMonitorPolicyKind) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { + const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(size_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (size_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(size_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) + case -2: + if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(size_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + size_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (size_t) -1; + } + } else { + size_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyInt_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *x) { + const npy_int16 neg_one = (npy_int16) ((npy_int16) 0 - (npy_int16) 1), const_zero = (npy_int16) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int16) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int16) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int16) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int16, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int16) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 2 * PyLong_SHIFT) { + return (npy_int16) (((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int16) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 3 * PyLong_SHIFT) { + return (npy_int16) (((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int16) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) >= 4 * PyLong_SHIFT) { + return (npy_int16) (((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int16) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int16) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int16) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int16, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int16, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int16) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int16) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + return (npy_int16) ((((((npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int16) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int16) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + return (npy_int16) ((((((((npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int16) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 4 * PyLong_SHIFT) { + return (npy_int16) (((npy_int16)-1)*(((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int16) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int16) - 1 > 4 * PyLong_SHIFT) { + return (npy_int16) ((((((((((npy_int16)digits[3]) << PyLong_SHIFT) | (npy_int16)digits[2]) << PyLong_SHIFT) | (npy_int16)digits[1]) << PyLong_SHIFT) | (npy_int16)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int16) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int16 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int16) -1; + } + } else { + npy_int16 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int16) -1; + val = __Pyx_PyInt_As_npy_int16(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int16"); + return (npy_int16) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int16"); + return (npy_int16) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *x) { + const npy_int8 neg_one = (npy_int8) ((npy_int8) 0 - (npy_int8) 1), const_zero = (npy_int8) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int8) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int8) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int8) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int8, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 2 * PyLong_SHIFT) { + return (npy_int8) (((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 3 * PyLong_SHIFT) { + return (npy_int8) (((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) >= 4 * PyLong_SHIFT) { + return (npy_int8) (((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int8) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int8) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int8) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int8, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int8, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int8) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + return (npy_int8) ((((((npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int8) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + return (npy_int8) ((((((((npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int8) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 4 * PyLong_SHIFT) { + return (npy_int8) (((npy_int8)-1)*(((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int8) - 1 > 4 * PyLong_SHIFT) { + return (npy_int8) ((((((((((npy_int8)digits[3]) << PyLong_SHIFT) | (npy_int8)digits[2]) << PyLong_SHIFT) | (npy_int8)digits[1]) << PyLong_SHIFT) | (npy_int8)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int8) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int8) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int8, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int8 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int8) -1; + } + } else { + npy_int8 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int8) -1; + val = __Pyx_PyInt_As_npy_int8(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int8"); + return (npy_int8) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int8"); + return (npy_int8) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { + const npy_uint8 neg_one = (npy_uint8) ((npy_uint8) 0 - (npy_uint8) 1), const_zero = (npy_uint8) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_uint8) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_uint8) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint8) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, digits[0]) + case 2: + if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 2 * PyLong_SHIFT) { + return (npy_uint8) (((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 3 * PyLong_SHIFT) { + return (npy_uint8) (((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) >= 4 * PyLong_SHIFT) { + return (npy_uint8) (((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_uint8) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_uint8) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint8) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_uint8, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_uint8, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_uint8) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_uint8) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint8) ((((((npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_uint8) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_uint8) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint8) ((((((((npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_uint8) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint8) (((npy_uint8)-1)*(((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_uint8) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint8) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint8) ((((((((((npy_uint8)digits[3]) << PyLong_SHIFT) | (npy_uint8)digits[2]) << PyLong_SHIFT) | (npy_uint8)digits[1]) << PyLong_SHIFT) | (npy_uint8)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_uint8) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint8) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint8, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_uint8 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_uint8) -1; + } + } else { + npy_uint8 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_uint8) -1; + val = __Pyx_PyInt_As_npy_uint8(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_uint8"); + return (npy_uint8) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_uint8"); + return (npy_uint8) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) { + const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_int32) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_int32) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int32) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0]) + case 2: + if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) { + return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) { + return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) { + return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_int32) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_int32) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_int32) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { + return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) { + return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_int32) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_int32 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_int32) -1; + } + } else { + npy_int32 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_int32) -1; + val = __Pyx_PyInt_As_npy_int32(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_int32"); + return (npy_int32) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_int32"); + return (npy_int32) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) { + const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(npy_uint32) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (npy_uint32) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint32) 0; + case 1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, digits[0]) + case 2: + if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT) { + return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT) { + return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT) { + return (npy_uint32) (((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (npy_uint32) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(npy_uint32) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (npy_uint32) 0; + case -1: __PYX_VERIFY_RETURN_INT(npy_uint32, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, +digits[0]) + case -2: + if (8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint32) (((npy_uint32)-1)*(((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) { + return (npy_uint32) ((((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]))); + } + } + break; + } +#endif + if (sizeof(npy_uint32) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + npy_uint32 val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (npy_uint32) -1; + } + } else { + npy_uint32 val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (npy_uint32) -1; + val = __Pyx_PyInt_As_npy_uint32(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to npy_uint32"); + return (npy_uint32) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to npy_uint32"); + return (npy_uint32) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *x) { + const dbr_long_t neg_one = (dbr_long_t) ((dbr_long_t) 0 - (dbr_long_t) 1), const_zero = (dbr_long_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(dbr_long_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (dbr_long_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_long_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(dbr_long_t, digit, digits[0]) + case 2: + if (8 * sizeof(dbr_long_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 2 * PyLong_SHIFT) { + return (dbr_long_t) (((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(dbr_long_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 3 * PyLong_SHIFT) { + return (dbr_long_t) (((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(dbr_long_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) >= 4 * PyLong_SHIFT) { + return (dbr_long_t) (((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (dbr_long_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(dbr_long_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_long_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(dbr_long_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(dbr_long_t, digit, +digits[0]) + case -2: + if (8 * sizeof(dbr_long_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(dbr_long_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_long_t) ((((((dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(dbr_long_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(dbr_long_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_long_t) ((((((((dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(dbr_long_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_long_t) (((dbr_long_t)-1)*(((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(dbr_long_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_long_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_long_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_long_t) ((((((((((dbr_long_t)digits[3]) << PyLong_SHIFT) | (dbr_long_t)digits[2]) << PyLong_SHIFT) | (dbr_long_t)digits[1]) << PyLong_SHIFT) | (dbr_long_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(dbr_long_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + dbr_long_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (dbr_long_t) -1; + } + } else { + dbr_long_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (dbr_long_t) -1; + val = __Pyx_PyInt_As_dbr_long_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to dbr_long_t"); + return (dbr_long_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to dbr_long_t"); + return (dbr_long_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { + const short neg_one = (short) ((short) 0 - (short) 1), const_zero = (short) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(short) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (short) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (short) 0; + case 1: __PYX_VERIFY_RETURN_INT(short, digit, digits[0]) + case 2: + if (8 * sizeof(short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 2 * PyLong_SHIFT) { + return (short) (((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 3 * PyLong_SHIFT) { + return (short) (((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) >= 4 * PyLong_SHIFT) { + return (short) (((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (short) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(short) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(short, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (short) 0; + case -1: __PYX_VERIFY_RETURN_INT(short, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(short, digit, +digits[0]) + case -2: + if (8 * sizeof(short) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(short) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + return (short) ((((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(short) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(short) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + return (short) ((((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(short) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) { + return (short) (((short)-1)*(((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(short) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(short) - 1 > 4 * PyLong_SHIFT) { + return (short) ((((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0]))); + } + } + break; + } +#endif + if (sizeof(short) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(short, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + short val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (short) -1; + } + } else { + short val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (short) -1; + val = __Pyx_PyInt_As_short(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to short"); + return (short) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to short"); + return (short) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *x) { + const dbr_char_t neg_one = (dbr_char_t) ((dbr_char_t) 0 - (dbr_char_t) 1), const_zero = (dbr_char_t) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(dbr_char_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (dbr_char_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_char_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(dbr_char_t, digit, digits[0]) + case 2: + if (8 * sizeof(dbr_char_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 2 * PyLong_SHIFT) { + return (dbr_char_t) (((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(dbr_char_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 3 * PyLong_SHIFT) { + return (dbr_char_t) (((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(dbr_char_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) >= 4 * PyLong_SHIFT) { + return (dbr_char_t) (((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (dbr_char_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(dbr_char_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (dbr_char_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(dbr_char_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(dbr_char_t, digit, +digits[0]) + case -2: + if (8 * sizeof(dbr_char_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(dbr_char_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + return (dbr_char_t) ((((((dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(dbr_char_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(dbr_char_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + return (dbr_char_t) ((((((((dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(dbr_char_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_char_t) (((dbr_char_t)-1)*(((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(dbr_char_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(dbr_char_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(dbr_char_t) - 1 > 4 * PyLong_SHIFT) { + return (dbr_char_t) ((((((((((dbr_char_t)digits[3]) << PyLong_SHIFT) | (dbr_char_t)digits[2]) << PyLong_SHIFT) | (dbr_char_t)digits[1]) << PyLong_SHIFT) | (dbr_char_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(dbr_char_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(dbr_char_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + dbr_char_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (dbr_char_t) -1; + } + } else { + dbr_char_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (dbr_char_t) -1; + val = __Pyx_PyInt_As_dbr_char_t(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to dbr_char_t"); + return (dbr_char_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to dbr_char_t"); + return (dbr_char_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG) ((PY_LONG_LONG) 0 - (PY_LONG_LONG) 1), const_zero = (PY_LONG_LONG) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(PY_LONG_LONG) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (PY_LONG_LONG) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (PY_LONG_LONG) 0; + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0]) + case 2: + if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) >= 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (PY_LONG_LONG) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (PY_LONG_LONG) 0; + case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, +digits[0]) + case -2: + if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]))); + } + } + break; + } +#endif + if (sizeof(PY_LONG_LONG) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + PY_LONG_LONG val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (PY_LONG_LONG) -1; + } + } else { + PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (PY_LONG_LONG) -1; + val = __Pyx_PyInt_As_PY_LONG_LONG(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { + const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(unsigned char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (unsigned char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned char) 0; + case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0]) + case 2: + if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) { + return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) { + return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT) { + return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(unsigned char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (unsigned char) 0; + case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, +digits[0]) + case -2: + if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { + return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { + return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(unsigned char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned char) -1; + } + } else { + unsigned char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (unsigned char) -1; + val = __Pyx_PyInt_As_unsigned_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned char"); + return (unsigned char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned char"); + return (unsigned char) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]) + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]) + case -2: + if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (char) -1; + } + } else { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; +} + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t < '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number; + int ndim = ctx->head->field->type->ndim; +; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if (ctx->enc_type == *ts && got_Z == ctx->is_complex && + ctx->enc_packmode == ctx->new_packmode) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* TypeInfoCompare */ + static int +__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) +{ + int i; + if (!a || !b) + return 0; + if (a == b) + return 1; + if (a->size != b->size || a->typegroup != b->typegroup || + a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { + if (a->typegroup == 'H' || b->typegroup == 'H') { + return a->size == b->size; + } else { + return 0; + } + } + if (a->ndim) { + for (i = 0; i < a->ndim; i++) + if (a->arraysize[i] != b->arraysize[i]) + return 0; + } + if (a->typegroup == 'S') { + if (a->flags != b->flags) + return 0; + if (a->fields || b->fields) { + if (!(a->fields && b->fields)) + return 0; + for (i = 0; a->fields[i].type && b->fields[i].type; i++) { + __Pyx_StructField *field_a = a->fields + i; + __Pyx_StructField *field_b = b->fields + i; + if (field_a->offset != field_b->offset || + !__pyx_typeinfo_cmp(field_a->type, field_b->type)) + return 0; + } + return !a->fields[i].type && !b->fields[i].type; + } + } + return 1; +} + +/* MemviewSliceValidateAndInit */ + static int +__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) +{ + if (buf->shape[dim] <= 1) + return 1; + if (buf->strides) { + if (spec & __Pyx_MEMVIEW_CONTIG) { + if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { + if (buf->strides[dim] != sizeof(void *)) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly contiguous " + "in dimension %d.", dim); + goto fail; + } + } else if (buf->strides[dim] != buf->itemsize) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_FOLLOW) { + Py_ssize_t stride = buf->strides[dim]; + if (stride < 0) + stride = -stride; + if (stride < buf->itemsize) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + } else { + if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not contiguous in " + "dimension %d", dim); + goto fail; + } else if (spec & (__Pyx_MEMVIEW_PTR)) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not indirect in " + "dimension %d", dim); + goto fail; + } else if (buf->suboffsets) { + PyErr_SetString(PyExc_ValueError, + "Buffer exposes suboffsets but no strides"); + goto fail; + } + } + return 1; +fail: + return 0; +} +static int +__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) +{ + if (spec & __Pyx_MEMVIEW_DIRECT) { + if (buf->suboffsets && buf->suboffsets[dim] >= 0) { + PyErr_Format(PyExc_ValueError, + "Buffer not compatible with direct access " + "in dimension %d.", dim); + goto fail; + } + } + if (spec & __Pyx_MEMVIEW_PTR) { + if (!buf->suboffsets || (buf->suboffsets && buf->suboffsets[dim] < 0)) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly accessible " + "in dimension %d.", dim); + goto fail; + } + } + return 1; +fail: + return 0; +} +static int +__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) +{ + int i; + if (c_or_f_flag & __Pyx_IS_F_CONTIG) { + Py_ssize_t stride = 1; + for (i = 0; i < ndim; i++) { + if (stride * buf->itemsize != buf->strides[i] && + buf->shape[i] > 1) + { + PyErr_SetString(PyExc_ValueError, + "Buffer not fortran contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { + Py_ssize_t stride = 1; + for (i = ndim - 1; i >- 1; i--) { + if (stride * buf->itemsize != buf->strides[i] && + buf->shape[i] > 1) { + PyErr_SetString(PyExc_ValueError, + "Buffer not C contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } + return 1; +fail: + return 0; +} +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj) +{ + struct __pyx_memoryview_obj *memview, *new_memview; + __Pyx_RefNannyDeclarations + Py_buffer *buf; + int i, spec = 0, retval = -1; + __Pyx_BufFmt_Context ctx; + int from_memoryview = __pyx_memoryview_check(original_obj); + __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); + if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) + original_obj)->typeinfo)) { + memview = (struct __pyx_memoryview_obj *) original_obj; + new_memview = NULL; + } else { + memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + original_obj, buf_flags, 0, dtype); + new_memview = memview; + if (unlikely(!memview)) + goto fail; + } + buf = &memview->view; + if (buf->ndim != ndim) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + ndim, buf->ndim); + goto fail; + } + if (new_memview) { + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if ((unsigned) buf->itemsize != dtype->size) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " + "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", + buf->itemsize, + (buf->itemsize > 1) ? "s" : "", + dtype->name, + dtype->size, + (dtype->size > 1) ? "s" : ""); + goto fail; + } + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (!__pyx_check_strides(buf, i, ndim, spec)) + goto fail; + if (!__pyx_check_suboffsets(buf, i, ndim, spec)) + goto fail; + } + if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)) + goto fail; + if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, + new_memview != NULL) == -1)) { + goto fail; + } + retval = 0; + goto no_fail; +fail: + Py_XDECREF(new_memview); + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint8_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_int, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_float, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_double, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + +/* CheckBinaryVersion */ + static int __Pyx_check_binary_version(void) { + char ctversion[4], rtversion[4]; + PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); + PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); + if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compiletime version %s of module '%.100s' " + "does not match runtime version %s", + ctversion, __Pyx_MODULE_NAME, rtversion); + return PyErr_WarnEx(NULL, message, 1); + } + return 0; +} + +/* InitStrings */ + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/src/bitshuffle/.deps/bitshuffle.Plo b/src/bitshuffle/.deps/bitshuffle.Plo index 1a7dbad..6848e18 100644 --- a/src/bitshuffle/.deps/bitshuffle.Plo +++ b/src/bitshuffle/.deps/bitshuffle.Plo @@ -1,27 +1,38 @@ bitshuffle/bitshuffle.lo: bitshuffle/bitshuffle.c \ /usr/include/stdc-predef.h bitshuffle/bitshuffle.h /usr/include/stdlib.h \ - /usr/include/features.h /usr/include/sys/cdefs.h \ - /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/bits/libc-header-start.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \ /usr/include/gnu/stubs-64.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stddef.h \ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h /usr/include/bits/stdint-intn.h \ /usr/include/endian.h /usr/include/bits/endian.h \ - /usr/include/bits/byteswap.h /usr/include/bits/types.h \ - /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ - /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ - /usr/include/bits/select.h /usr/include/bits/sigset.h \ - /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ - /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/bits/stdlib-float.h bitshuffle/bitshuffle_core.h \ + /usr/include/bits/byteswap.h /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + bitshuffle/bitshuffle_core.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdint.h \ /usr/include/stdint.h /usr/include/bits/wchar.h \ - bitshuffle/bitshuffle_internals.h bitshuffle/iochain.h \ - .././include/lz4.h /usr/include/stdio.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/stdint-uintn.h bitshuffle/bitshuffle_internals.h \ + bitshuffle/iochain.h .././include/lz4.h /usr/include/stdio.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdarg.h \ + /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ - /usr/include/bits/stdio.h /usr/include/string.h /usr/include/xlocale.h \ - /usr/include/bits/string.h /usr/include/bits/string2.h + /usr/include/bits/stdio.h /usr/include/string.h \ + /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \ + /usr/include/strings.h /usr/include/stdc-predef.h: @@ -29,12 +40,16 @@ bitshuffle/bitshuffle.h: /usr/include/stdlib.h: +/usr/include/bits/libc-header-start.h: + /usr/include/features.h: /usr/include/sys/cdefs.h: /usr/include/bits/wordsize.h: +/usr/include/bits/long-double.h: + /usr/include/gnu/stubs.h: /usr/include/gnu/stubs-64.h: @@ -45,36 +60,56 @@ bitshuffle/bitshuffle.h: /usr/include/bits/waitstatus.h: +/usr/include/bits/floatn.h: + +/usr/include/bits/floatn-common.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/types/clock_t.h: + +/usr/include/bits/types/clockid_t.h: + +/usr/include/bits/types/time_t.h: + +/usr/include/bits/types/timer_t.h: + +/usr/include/bits/stdint-intn.h: + /usr/include/endian.h: /usr/include/bits/endian.h: /usr/include/bits/byteswap.h: -/usr/include/bits/types.h: - -/usr/include/bits/typesizes.h: - -/usr/include/bits/byteswap-16.h: - -/usr/include/sys/types.h: - -/usr/include/time.h: +/usr/include/bits/uintn-identity.h: /usr/include/sys/select.h: /usr/include/bits/select.h: -/usr/include/bits/sigset.h: +/usr/include/bits/types/sigset_t.h: -/usr/include/bits/time.h: +/usr/include/bits/types/__sigset_t.h: -/usr/include/sys/sysmacros.h: +/usr/include/bits/types/struct_timeval.h: + +/usr/include/bits/types/struct_timespec.h: /usr/include/bits/pthreadtypes.h: +/usr/include/bits/thread-shared-types.h: + +/usr/include/bits/pthreadtypes-arch.h: + /usr/include/alloca.h: +/usr/include/bits/stdlib-bsearch.h: + /usr/include/bits/stdlib-float.h: bitshuffle/bitshuffle_core.h: @@ -85,6 +120,8 @@ bitshuffle/bitshuffle_core.h: /usr/include/bits/wchar.h: +/usr/include/bits/stdint-uintn.h: + bitshuffle/bitshuffle_internals.h: bitshuffle/iochain.h: @@ -93,14 +130,20 @@ bitshuffle/iochain.h: /usr/include/stdio.h: -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdarg.h: +/usr/include/bits/types/__fpos_t.h: + +/usr/include/bits/types/__mbstate_t.h: + +/usr/include/bits/types/__fpos64_t.h: + +/usr/include/bits/types/__FILE.h: + +/usr/include/bits/types/FILE.h: + +/usr/include/bits/types/struct_FILE.h: + /usr/include/bits/stdio_lim.h: /usr/include/bits/sys_errlist.h: @@ -109,8 +152,8 @@ bitshuffle/iochain.h: /usr/include/string.h: -/usr/include/xlocale.h: +/usr/include/bits/types/locale_t.h: -/usr/include/bits/string.h: +/usr/include/bits/types/__locale_t.h: -/usr/include/bits/string2.h: +/usr/include/strings.h: diff --git a/src/bitshuffle/.deps/bitshuffle_core.Plo b/src/bitshuffle/.deps/bitshuffle_core.Plo index c3319ef..382ccf3 100644 --- a/src/bitshuffle/.deps/bitshuffle_core.Plo +++ b/src/bitshuffle/.deps/bitshuffle_core.Plo @@ -1,26 +1,38 @@ bitshuffle/bitshuffle_core.lo: bitshuffle/bitshuffle_core.c \ /usr/include/stdc-predef.h bitshuffle/bitshuffle_core.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdint.h \ - /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ - /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ - /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ - /usr/include/stdlib.h \ + /usr/include/stdint.h /usr/include/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/wchar.h /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h /usr/include/stdlib.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stddef.h \ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ - /usr/include/endian.h /usr/include/bits/endian.h \ - /usr/include/bits/byteswap.h /usr/include/bits/types.h \ - /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ - /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ - /usr/include/bits/select.h /usr/include/bits/sigset.h \ - /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ - /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/bits/stdlib-float.h bitshuffle/bitshuffle_internals.h \ - bitshuffle/iochain.h /usr/include/stdio.h /usr/include/libio.h \ - /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \ + /usr/include/sys/types.h /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + bitshuffle/bitshuffle_internals.h bitshuffle/iochain.h \ + /usr/include/stdio.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdarg.h \ + /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ - /usr/include/bits/stdio.h /usr/include/string.h /usr/include/xlocale.h \ - /usr/include/bits/string.h /usr/include/bits/string2.h \ + /usr/include/bits/stdio.h /usr/include/string.h \ + /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \ + /usr/include/strings.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/emmintrin.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/xmmintrin.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/mmintrin.h \ @@ -34,18 +46,30 @@ bitshuffle/bitshuffle_core.h: /usr/include/stdint.h: +/usr/include/bits/libc-header-start.h: + /usr/include/features.h: /usr/include/sys/cdefs.h: /usr/include/bits/wordsize.h: +/usr/include/bits/long-double.h: + /usr/include/gnu/stubs.h: /usr/include/gnu/stubs-64.h: +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + /usr/include/bits/wchar.h: +/usr/include/bits/stdint-intn.h: + +/usr/include/bits/stdint-uintn.h: + /usr/include/stdlib.h: /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stddef.h: @@ -54,36 +78,50 @@ bitshuffle/bitshuffle_core.h: /usr/include/bits/waitstatus.h: +/usr/include/bits/floatn.h: + +/usr/include/bits/floatn-common.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types/clock_t.h: + +/usr/include/bits/types/clockid_t.h: + +/usr/include/bits/types/time_t.h: + +/usr/include/bits/types/timer_t.h: + /usr/include/endian.h: /usr/include/bits/endian.h: /usr/include/bits/byteswap.h: -/usr/include/bits/types.h: - -/usr/include/bits/typesizes.h: - -/usr/include/bits/byteswap-16.h: - -/usr/include/sys/types.h: - -/usr/include/time.h: +/usr/include/bits/uintn-identity.h: /usr/include/sys/select.h: /usr/include/bits/select.h: -/usr/include/bits/sigset.h: +/usr/include/bits/types/sigset_t.h: -/usr/include/bits/time.h: +/usr/include/bits/types/__sigset_t.h: -/usr/include/sys/sysmacros.h: +/usr/include/bits/types/struct_timeval.h: + +/usr/include/bits/types/struct_timespec.h: /usr/include/bits/pthreadtypes.h: +/usr/include/bits/thread-shared-types.h: + +/usr/include/bits/pthreadtypes-arch.h: + /usr/include/alloca.h: +/usr/include/bits/stdlib-bsearch.h: + /usr/include/bits/stdlib-float.h: bitshuffle/bitshuffle_internals.h: @@ -92,14 +130,20 @@ bitshuffle/iochain.h: /usr/include/stdio.h: -/usr/include/libio.h: - -/usr/include/_G_config.h: - -/usr/include/wchar.h: - /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdarg.h: +/usr/include/bits/types/__fpos_t.h: + +/usr/include/bits/types/__mbstate_t.h: + +/usr/include/bits/types/__fpos64_t.h: + +/usr/include/bits/types/__FILE.h: + +/usr/include/bits/types/FILE.h: + +/usr/include/bits/types/struct_FILE.h: + /usr/include/bits/stdio_lim.h: /usr/include/bits/sys_errlist.h: @@ -108,11 +152,11 @@ bitshuffle/iochain.h: /usr/include/string.h: -/usr/include/xlocale.h: +/usr/include/bits/types/locale_t.h: -/usr/include/bits/string.h: +/usr/include/bits/types/__locale_t.h: -/usr/include/bits/string2.h: +/usr/include/strings.h: /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/emmintrin.h: diff --git a/src/bitshuffle/.deps/iochain.Plo b/src/bitshuffle/.deps/iochain.Plo index 3d104ee..c8ca6d6 100644 --- a/src/bitshuffle/.deps/iochain.Plo +++ b/src/bitshuffle/.deps/iochain.Plo @@ -1,28 +1,40 @@ bitshuffle/iochain.lo: bitshuffle/iochain.c /usr/include/stdc-predef.h \ - /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \ - /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ - /usr/include/gnu/stubs-64.h \ + /usr/include/stdlib.h /usr/include/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stddef.h \ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h /usr/include/bits/stdint-intn.h \ /usr/include/endian.h /usr/include/bits/endian.h \ - /usr/include/bits/byteswap.h /usr/include/bits/types.h \ - /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ - /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ - /usr/include/bits/select.h /usr/include/bits/sigset.h \ - /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ - /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ - /usr/include/bits/stdlib-float.h bitshuffle/iochain.h + /usr/include/bits/byteswap.h /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + bitshuffle/iochain.h /usr/include/stdc-predef.h: /usr/include/stdlib.h: +/usr/include/bits/libc-header-start.h: + /usr/include/features.h: /usr/include/sys/cdefs.h: /usr/include/bits/wordsize.h: +/usr/include/bits/long-double.h: + /usr/include/gnu/stubs.h: /usr/include/gnu/stubs-64.h: @@ -33,36 +45,56 @@ bitshuffle/iochain.lo: bitshuffle/iochain.c /usr/include/stdc-predef.h \ /usr/include/bits/waitstatus.h: +/usr/include/bits/floatn.h: + +/usr/include/bits/floatn-common.h: + +/usr/include/sys/types.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/types/clock_t.h: + +/usr/include/bits/types/clockid_t.h: + +/usr/include/bits/types/time_t.h: + +/usr/include/bits/types/timer_t.h: + +/usr/include/bits/stdint-intn.h: + /usr/include/endian.h: /usr/include/bits/endian.h: /usr/include/bits/byteswap.h: -/usr/include/bits/types.h: - -/usr/include/bits/typesizes.h: - -/usr/include/bits/byteswap-16.h: - -/usr/include/sys/types.h: - -/usr/include/time.h: +/usr/include/bits/uintn-identity.h: /usr/include/sys/select.h: /usr/include/bits/select.h: -/usr/include/bits/sigset.h: +/usr/include/bits/types/sigset_t.h: -/usr/include/bits/time.h: +/usr/include/bits/types/__sigset_t.h: -/usr/include/sys/sysmacros.h: +/usr/include/bits/types/struct_timeval.h: + +/usr/include/bits/types/struct_timespec.h: /usr/include/bits/pthreadtypes.h: +/usr/include/bits/thread-shared-types.h: + +/usr/include/bits/pthreadtypes-arch.h: + /usr/include/alloca.h: +/usr/include/bits/stdlib-bsearch.h: + /usr/include/bits/stdlib-float.h: bitshuffle/iochain.h: diff --git a/src/cafe.cpp b/src/cafe.cpp index d787d48..eba9892 100644 --- a/src/cafe.cpp +++ b/src/cafe.cpp @@ -30,20 +30,6 @@ using namespace std; -bool MUTEX=true; -bool CHECK_CONSISTENCY_CA_STATE=true; -bool SF_WITH_PULSE_ID = false; - -vector PVGroupV; -vector PVGroupPseudo; -vector deviceCollectionV; -vector globalChannelList; -map, string> groupPseudoMap; - -cafeGroup_set gs; -cafeConduit_set cs; -epicsMutex cafeMutex; - /* int CAFE::wfExpress(const unsigned int handle) { int status = ICAFE_NORMAL; @@ -81,8 +67,7 @@ int CAFE::wfExpress(const unsigned int handle, const unsigned int nelem, dbr_ch if (it_handle != handle_index.end()) { - - + std::cout << "Initiate Callback =============" << std::endl; status=(*it_handle).getWithCallback(CALLBACK_CAFE::handlerGet); ca_flush_io(); diff --git a/src/connect.cpp b/src/connect.cpp index 14ea5fe..46e5baa 100644 --- a/src/connect.cpp +++ b/src/connect.cpp @@ -5,7 +5,7 @@ /// \version CAFE 1.6.0 /// -#include +//#include #include #include @@ -27,7 +27,23 @@ #endif +bool MUTEX=true; +bool CHECK_CONSISTENCY_CA_STATE=true; +bool SF_WITH_PULSE_ID = false; + using namespace std; +vector PVGroupV; +vector PVGroupPseudo; +vector deviceCollectionV; +vector globalChannelList; +map, string> groupPseudoMap; + +cafeGroup_set gs; +cafeConduit_set cs; +epicsMutex cafeMutex; + + + //epicsMutex cafeMutex; /** diff --git a/src/makefile b/src/makefile index fda34f5..597b2b8 100644 --- a/src/makefile +++ b/src/makefile @@ -1,7 +1,7 @@ -# makefile.in generated by automake 1.13.4 from makefile.am. +# makefile.in generated by automake 1.16.1 from makefile.am. # src/makefile. Generated from makefile.in by configure. -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -76,15 +86,13 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu -#am__append_1 = PyCafe.cpp +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +am__append_1 = PyCafe.cpp #am__append_2 = zbsCafeService.cpp zbsDataHolders.cpp \ # bitshuffle/bitshuffle_core.c bitshuffle/bitshuffle.c bitshuffle/iochain.c subdir = src -DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/makefile.am \ - $(top_srcdir)/./depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -92,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/./include/config.h CONFIG_CLEAN_FILES = @@ -137,7 +146,7 @@ am__libcafe_la_SOURCES_DIST = cafe.cpp cafeCache.cpp cafeGroup.cpp \ zbsCafeService.cpp zbsDataHolders.cpp \ bitshuffle/bitshuffle_core.c bitshuffle/bitshuffle.c \ bitshuffle/iochain.c -#am__objects_1 = PyCafe.lo +am__objects_1 = PyCafe.lo am__dirstamp = $(am__leading_dot)dirstamp #am__objects_2 = zbsCafeService.lo zbsDataHolders.lo \ # bitshuffle/bitshuffle_core.lo \ @@ -173,7 +182,25 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I. -I$(top_builddir)/./include depcomp = $(SHELL) $(top_srcdir)/./depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/PyCafe.Plo ./$(DEPDIR)/cafe.Plo \ + ./$(DEPDIR)/cafeCache.Plo ./$(DEPDIR)/cafeGroup.Plo \ + ./$(DEPDIR)/cafeVectors.Plo ./$(DEPDIR)/cafeXML.Plo \ + ./$(DEPDIR)/callbackHandlerCreate.Plo \ + ./$(DEPDIR)/callbackHandlerMonitor.Plo ./$(DEPDIR)/conduit.Plo \ + ./$(DEPDIR)/conduitGroup.Plo ./$(DEPDIR)/connect.Plo \ + ./$(DEPDIR)/connectCallbacks.Plo ./$(DEPDIR)/connectGroup.Plo \ + ./$(DEPDIR)/exceptionsHelper.Plo ./$(DEPDIR)/granules.Plo \ + ./$(DEPDIR)/handleHelper.Plo ./$(DEPDIR)/helper.Plo \ + ./$(DEPDIR)/loadCollectionXMLParser.Plo \ + ./$(DEPDIR)/loadGroupXMLParser.Plo \ + ./$(DEPDIR)/methodCallbacks.Plo ./$(DEPDIR)/policyHelper.Plo \ + ./$(DEPDIR)/restorePVGroupXMLParser.Plo \ + ./$(DEPDIR)/transpose.Plo ./$(DEPDIR)/zbsCafeService.Plo \ + ./$(DEPDIR)/zbsDataHolders.Plo \ + bitshuffle/$(DEPDIR)/bitshuffle.Plo \ + bitshuffle/$(DEPDIR)/bitshuffle_core.Plo \ + bitshuffle/$(DEPDIR)/iochain.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -237,8 +264,9 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/makefile.in $(top_srcdir)/./depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13 +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.16 AMTAR = $${TAR-tar} #if HAVE_PYCAFE_EXT_ @@ -248,22 +276,22 @@ AMTAR = $${TAR-tar} #if HAVE_PYTHON_ #libcafe_la_SOURCES += pycafe/PyCafe.cpp #endif -AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -I$(top_srcdir)/include +AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include -I$(top_srcdir)/include AM_DEFAULT_VERBOSITY = 1 -AM_LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib +AM_LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib AR = ar AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader -AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13 +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.16 AWK = gawk CAFE_CPPFLAGS = -I$(top_srcdir)/include -CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 -CPP = /opt/psi/Programming/gcc/7.3.0/bin/gcc -E -CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.6/include/ -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -CXX = /opt/psi/Programming/gcc/7.3.0/bin/g++ -CXXCPP = /opt/psi/Programming/gcc/7.3.0/bin/g++ -E +CPP = /opt/psi/Programming/gcc/7.5.0/bin/gcc -E +CPPFLAGS = -fexceptions -fPIC -std=c++1z -I/usr/local/epics/base-7.0.7/include/ -I/usr/local/epics/base-7.0.7/include/os/Linux -I/usr/local/epics/base-7.0.7/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.10/latest/include/python3.10 -I/opt/gfa/python-3.10/latest/lib/python3.10/site-packages/numpy/core/include +CXX = /opt/psi/Programming/gcc/7.5.0/bin/g++ +CXXCPP = /opt/psi/Programming/gcc/7.5.0/bin/g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo @@ -285,9 +313,9 @@ INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib +LDFLAGS = -L/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.7/lib/RHEL8-x86_64 -L/opt/gfa/python-3.10/latest/lib -Wl,-rpath,/opt/gfa/python-3.10/latest/lib LIBOBJS = -LIBS = -lQt5Xml -lQt5Core +LIBS = -lpython3.10 LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s @@ -305,23 +333,23 @@ OTOOL64 = PACKAGE = cafe PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch PACKAGE_NAME = CAFE -PACKAGE_STRING = CAFE 1.19.1 +PACKAGE_STRING = CAFE 1.19.3 PACKAGE_TARNAME = cafe PACKAGE_URL = -PACKAGE_VERSION = 1.19.1 +PACKAGE_VERSION = 1.19.3 PATH_SEPARATOR = : RANLIB = ranlib SED = /usr/bin/sed SET_MAKE = SHELL = /bin/sh STRIP = strip -VERSION = 1.19.1 +VERSION = 1.19.3 abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/src abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/src abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp ac_ct_AR = ar -ac_ct_CC = /opt/psi/Programming/gcc/7.3.0/bin/gcc +ac_ct_CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc ac_ct_CXX = ac_ct_DUMPBIN = am__include = include @@ -330,27 +358,27 @@ am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu +build = x86_64-pc-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu -build_vendor = unknown +build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu +host = x86_64-pc-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu -host_vendor = unknown +host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh -libdir = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0/lib/RHEL7-x86_64 +libdir = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0/lib/RHEL8-x86_64 libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var @@ -358,7 +386,7 @@ mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} -prefix = /opt/gfa/cafe/cpp/cafe-1.19.1-gcc-7.3.0 +prefix = /opt/gfa/cafe/cpp/cafe-1.19.3-py310-gcc-7.5.0 program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin @@ -377,8 +405,8 @@ lib_LTLIBRARIES = libcafe.la #1st: current-age #2nd: age #3rd: revision -#1.9.1 1.10.2 1.11.0 1.11.1 1.12.0 1.12.1 1.12.2 1.12.4 -libcafe_la_LDFLAGS = -version-info 20:1:19 +#1.9.2 1.10.2 1.11.0 1.11.1 1.12.0 1.12.1 1.12.2 1.12.4 +libcafe_la_LDFLAGS = -version-info 20:3:19 libcafe_la_SOURCES = cafe.cpp cafeCache.cpp cafeGroup.cpp \ cafeVectors.cpp cafeXML.cpp callbackHandlerCreate.cpp \ callbackHandlerMonitor.cpp conduit.cpp connect.cpp \ @@ -404,14 +432,13 @@ $(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -481,34 +508,40 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -include ./$(DEPDIR)/PyCafe.Plo -include ./$(DEPDIR)/cafe.Plo -include ./$(DEPDIR)/cafeCache.Plo -include ./$(DEPDIR)/cafeGroup.Plo -include ./$(DEPDIR)/cafeVectors.Plo -include ./$(DEPDIR)/cafeXML.Plo -include ./$(DEPDIR)/callbackHandlerCreate.Plo -include ./$(DEPDIR)/callbackHandlerMonitor.Plo -include ./$(DEPDIR)/conduit.Plo -include ./$(DEPDIR)/conduitGroup.Plo -include ./$(DEPDIR)/connect.Plo -include ./$(DEPDIR)/connectCallbacks.Plo -include ./$(DEPDIR)/connectGroup.Plo -include ./$(DEPDIR)/exceptionsHelper.Plo -include ./$(DEPDIR)/granules.Plo -include ./$(DEPDIR)/handleHelper.Plo -include ./$(DEPDIR)/helper.Plo -include ./$(DEPDIR)/loadCollectionXMLParser.Plo -include ./$(DEPDIR)/loadGroupXMLParser.Plo -include ./$(DEPDIR)/methodCallbacks.Plo -include ./$(DEPDIR)/policyHelper.Plo -include ./$(DEPDIR)/restorePVGroupXMLParser.Plo -include ./$(DEPDIR)/transpose.Plo -include ./$(DEPDIR)/zbsCafeService.Plo -include ./$(DEPDIR)/zbsDataHolders.Plo -include bitshuffle/$(DEPDIR)/bitshuffle.Plo -include bitshuffle/$(DEPDIR)/bitshuffle_core.Plo -include bitshuffle/$(DEPDIR)/iochain.Plo +include ./$(DEPDIR)/PyCafe.Plo # am--include-marker +include ./$(DEPDIR)/cafe.Plo # am--include-marker +include ./$(DEPDIR)/cafeCache.Plo # am--include-marker +include ./$(DEPDIR)/cafeGroup.Plo # am--include-marker +include ./$(DEPDIR)/cafeVectors.Plo # am--include-marker +include ./$(DEPDIR)/cafeXML.Plo # am--include-marker +include ./$(DEPDIR)/callbackHandlerCreate.Plo # am--include-marker +include ./$(DEPDIR)/callbackHandlerMonitor.Plo # am--include-marker +include ./$(DEPDIR)/conduit.Plo # am--include-marker +include ./$(DEPDIR)/conduitGroup.Plo # am--include-marker +include ./$(DEPDIR)/connect.Plo # am--include-marker +include ./$(DEPDIR)/connectCallbacks.Plo # am--include-marker +include ./$(DEPDIR)/connectGroup.Plo # am--include-marker +include ./$(DEPDIR)/exceptionsHelper.Plo # am--include-marker +include ./$(DEPDIR)/granules.Plo # am--include-marker +include ./$(DEPDIR)/handleHelper.Plo # am--include-marker +include ./$(DEPDIR)/helper.Plo # am--include-marker +include ./$(DEPDIR)/loadCollectionXMLParser.Plo # am--include-marker +include ./$(DEPDIR)/loadGroupXMLParser.Plo # am--include-marker +include ./$(DEPDIR)/methodCallbacks.Plo # am--include-marker +include ./$(DEPDIR)/policyHelper.Plo # am--include-marker +include ./$(DEPDIR)/restorePVGroupXMLParser.Plo # am--include-marker +include ./$(DEPDIR)/transpose.Plo # am--include-marker +include ./$(DEPDIR)/zbsCafeService.Plo # am--include-marker +include ./$(DEPDIR)/zbsDataHolders.Plo # am--include-marker +include bitshuffle/$(DEPDIR)/bitshuffle.Plo # am--include-marker +include bitshuffle/$(DEPDIR)/bitshuffle_core.Plo # am--include-marker +include bitshuffle/$(DEPDIR)/iochain.Plo # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -617,7 +650,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -692,7 +728,34 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) bitshuffle/$(DEPDIR) + -rm -f ./$(DEPDIR)/PyCafe.Plo + -rm -f ./$(DEPDIR)/cafe.Plo + -rm -f ./$(DEPDIR)/cafeCache.Plo + -rm -f ./$(DEPDIR)/cafeGroup.Plo + -rm -f ./$(DEPDIR)/cafeVectors.Plo + -rm -f ./$(DEPDIR)/cafeXML.Plo + -rm -f ./$(DEPDIR)/callbackHandlerCreate.Plo + -rm -f ./$(DEPDIR)/callbackHandlerMonitor.Plo + -rm -f ./$(DEPDIR)/conduit.Plo + -rm -f ./$(DEPDIR)/conduitGroup.Plo + -rm -f ./$(DEPDIR)/connect.Plo + -rm -f ./$(DEPDIR)/connectCallbacks.Plo + -rm -f ./$(DEPDIR)/connectGroup.Plo + -rm -f ./$(DEPDIR)/exceptionsHelper.Plo + -rm -f ./$(DEPDIR)/granules.Plo + -rm -f ./$(DEPDIR)/handleHelper.Plo + -rm -f ./$(DEPDIR)/helper.Plo + -rm -f ./$(DEPDIR)/loadCollectionXMLParser.Plo + -rm -f ./$(DEPDIR)/loadGroupXMLParser.Plo + -rm -f ./$(DEPDIR)/methodCallbacks.Plo + -rm -f ./$(DEPDIR)/policyHelper.Plo + -rm -f ./$(DEPDIR)/restorePVGroupXMLParser.Plo + -rm -f ./$(DEPDIR)/transpose.Plo + -rm -f ./$(DEPDIR)/zbsCafeService.Plo + -rm -f ./$(DEPDIR)/zbsDataHolders.Plo + -rm -f bitshuffle/$(DEPDIR)/bitshuffle.Plo + -rm -f bitshuffle/$(DEPDIR)/bitshuffle_core.Plo + -rm -f bitshuffle/$(DEPDIR)/iochain.Plo -rm -f makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -738,7 +801,34 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) bitshuffle/$(DEPDIR) + -rm -f ./$(DEPDIR)/PyCafe.Plo + -rm -f ./$(DEPDIR)/cafe.Plo + -rm -f ./$(DEPDIR)/cafeCache.Plo + -rm -f ./$(DEPDIR)/cafeGroup.Plo + -rm -f ./$(DEPDIR)/cafeVectors.Plo + -rm -f ./$(DEPDIR)/cafeXML.Plo + -rm -f ./$(DEPDIR)/callbackHandlerCreate.Plo + -rm -f ./$(DEPDIR)/callbackHandlerMonitor.Plo + -rm -f ./$(DEPDIR)/conduit.Plo + -rm -f ./$(DEPDIR)/conduitGroup.Plo + -rm -f ./$(DEPDIR)/connect.Plo + -rm -f ./$(DEPDIR)/connectCallbacks.Plo + -rm -f ./$(DEPDIR)/connectGroup.Plo + -rm -f ./$(DEPDIR)/exceptionsHelper.Plo + -rm -f ./$(DEPDIR)/granules.Plo + -rm -f ./$(DEPDIR)/handleHelper.Plo + -rm -f ./$(DEPDIR)/helper.Plo + -rm -f ./$(DEPDIR)/loadCollectionXMLParser.Plo + -rm -f ./$(DEPDIR)/loadGroupXMLParser.Plo + -rm -f ./$(DEPDIR)/methodCallbacks.Plo + -rm -f ./$(DEPDIR)/policyHelper.Plo + -rm -f ./$(DEPDIR)/restorePVGroupXMLParser.Plo + -rm -f ./$(DEPDIR)/transpose.Plo + -rm -f ./$(DEPDIR)/zbsCafeService.Plo + -rm -f ./$(DEPDIR)/zbsDataHolders.Plo + -rm -f bitshuffle/$(DEPDIR)/bitshuffle.Plo + -rm -f bitshuffle/$(DEPDIR)/bitshuffle_core.Plo + -rm -f bitshuffle/$(DEPDIR)/iochain.Plo -rm -f makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -759,9 +849,9 @@ uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags 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 \ @@ -773,6 +863,8 @@ uninstall-am: uninstall-libLTLIBRARIES mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES +.PRECIOUS: makefile + # 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. diff --git a/src/makefile.am b/src/makefile.am index 4a1ab40..1b4c63d 100644 --- a/src/makefile.am +++ b/src/makefile.am @@ -11,8 +11,8 @@ lib_LTLIBRARIES = libcafe.la #1st: current-age #2nd: age #3rd: revision -#1.9.1 1.10.2 1.11.0 1.11.1 1.12.0 1.12.1 1.12.2 1.12.4 -libcafe_la_LDFLAGS = -version-info 20:1:19 +#1.9.2 1.10.2 1.11.0 1.11.1 1.12.0 1.12.1 1.12.2 1.12.4 +libcafe_la_LDFLAGS = -version-info 20:3:19 libcafe_la_SOURCES = cafe.cpp cafeCache.cpp cafeGroup.cpp cafeVectors.cpp cafeXML.cpp \ callbackHandlerCreate.cpp callbackHandlerMonitor.cpp conduit.cpp connect.cpp connectCallbacks.cpp \